@@ -2429,5 +2429,30 @@ Rectangle {
2429 ApplicationManager.requestFocusApplication("calendar-app");
2429 ApplicationManager.requestFocusApplication("calendar-app");
2430 tryCompare(app2Surface, "keymap", "fr");
2430 tryCompare(app2Surface, "keymap", "fr");
2433+ function test_dragPanelToRestoreMaximizedWindow() {
2434+ loadShell("desktop");
2435+ shell.usageScenario = "desktop";
2436+ waitForRendering(shell);
2437+ var panel = findChild(shell, "windowControlArea");
2440+ var appSurfaceId = topLevelSurfaceList.nextId;
2441+ var app = ApplicationManager.startApplication("dialer-app")
2442+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
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");
2452+ mouseMove(shell, shell.width/2, shell.height/2);
2453+ mouseRelease(shell);
2455+ tryCompare(appDelegate, "state", "normal");