@@ -2429,5 +2429,30 @@ Rectangle {
24292429 ApplicationManager.requestFocusApplication("calendar-app");
24302430 tryCompare(app2Surface, "keymap", "fr");
24312431 }
2432+
2433+ function test_dragPanelToRestoreMaximizedWindow() {
2434+ loadShell("desktop");
2435+ shell.usageScenario = "desktop";
2436+ waitForRendering(shell);
2437+ var panel = findChild(shell, "windowControlArea");
2438+ verify(panel);
2439+
2440+ var appSurfaceId = topLevelSurfaceList.nextId;
2441+ var app = ApplicationManager.startApplication("dialer-app")
2442+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
2443+
2444+ // start dialer, maximize it
2445+ var appContainer = findChild(shell, "appContainer");
2446+ var appDelegate = findChild(appContainer, "appDelegate_" + appSurfaceId);
2447+ verify(appDelegate);
2448+ appDelegate.maximize();
2449+ tryCompare(appDelegate, "state", "maximized");
2450+
2451+ mousePress(panel);
2452+ mouseMove(shell, shell.width/2, shell.height/2);
2453+ mouseRelease(shell);
2454+
2455+ tryCompare(appDelegate, "state", "normal");
2456+ }
24322457 }
24332458}