@@ -2810,5 +2810,33 @@ Rectangle {
28102810 appDelegate.requestRestore();
28112811 tryCompare(appDelegate, "state", "maximizedRight");
28122812 }
2813+
2814+ function test_altTabToMinimizedApp() {
2815+ loadShell("desktop");
2816+ shell.usageScenario = "desktop";
2817+ waitForRendering(shell);
2818+ swipeAwayGreeter();
2819+
2820+ var appSurfaceId = topLevelSurfaceList.nextId;
2821+ var app = ApplicationManager.startApplication("dialer-app")
2822+ waitUntilAppWindowIsFullyLoaded(appSurfaceId);
2823+
2824+ // start dialer
2825+ var appContainer = findChild(shell, "appContainer");
2826+ var appDelegate = findChild(appContainer, "appDelegate_" + appSurfaceId);
2827+ verify(appDelegate);
2828+ tryCompare(appDelegate, "state", "normal");
2829+
2830+ // minimize dialer
2831+ appDelegate.requestMinimize();
2832+ tryCompare(appDelegate, "state", "minimized");
2833+
2834+ // try to bring dialer back from minimized by doing alt-tab
2835+ keyClick(Qt.Key_Tab, Qt.AltModifier);
2836+ tryCompare(appDelegate, "visible", true);
2837+ tryCompare(appDelegate, "focus", true);
2838+ tryCompare(topLevelSurfaceList.focusedWindow, "surface", appDelegate.surface);
2839+ tryCompare(topLevelSurfaceList.applicationAt(0), "appId", "dialer-app");
2840+ }
28132841 }
28142842}