@@ -2910,5 +2910,29 @@ Rectangle {
29102910 tryCompare(topLevelSurfaceList.focusedWindow, "surface", appDelegate.surface);
29112911 tryCompare(topLevelSurfaceList.applicationAt(0), "appId", "dialer-app");
29122912 }
2913+
2914+ function test_doubleClickPanelRestoresWindow() {
2915+ loadShell("desktop");
2916+ shell.usageScenario = "desktop";
2917+ waitForRendering(shell);
2918+ swipeAwayGreeter();
2919+
2920+ // start dialer
2921+ var appDelegate = startApplication("dialer-app")
2922+ verify(appDelegate);
2923+ tryCompare(appDelegate, "state", "normal");
2924+
2925+ // maximize dialer
2926+ var decoration = findChild(appDelegate, "appWindowDecoration");
2927+ verify(decoration);
2928+ mouseDoubleClickSequence(decoration);
2929+ tryCompare(appDelegate, "state", "maximized");
2930+
2931+ // double click the panel
2932+ var panel = findChild(shell, "panel");
2933+ verify(panel);
2934+ mouseDoubleClickSequence(panel, panel.width/2, PanelState.panelHeight/2, Qt.LeftButton, Qt.NoModifier, 300);
2935+ tryCompare(appDelegate, "state", "restored");
2936+ }
29132937 }
29142938}