@@ -2345,5 +2345,29 @@ Rectangle {
23452345 tryCompare(app2.session.lastSurface, "keymapLayout", "fr");
23462346 tryCompare(app2.session.lastSurface, "keymapVariant", "");
23472347 }
2348+
2349+ function test_dragPanelToRestoreMaximizedWindow() {
2350+ loadShell("desktop");
2351+ shell.usageScenario = "desktop";
2352+ waitForRendering(shell);
2353+ var panel = findChild(shell, "windowControlArea");
2354+ verify(panel);
2355+
2356+ var app = ApplicationManager.startApplication("dialer-app")
2357+ waitUntilAppWindowIsFullyLoaded(app);
2358+
2359+ // start dialer, maximize it
2360+ var appContainer = findChild(shell, "appContainer");
2361+ var appDelegate = findChild(appContainer, "appDelegate_dialer-app");
2362+ verify(appDelegate);
2363+ appDelegate.maximize();
2364+ tryCompare(appDelegate, "state", "maximized");
2365+
2366+ mousePress(panel);
2367+ mouseMove(shell, shell.width/2, shell.height/2);
2368+ mouseRelease(shell);
2369+
2370+ tryCompare(appDelegate, "state", "normal");
2371+ }
23482372 }
23492373}