@@ -322,5 +322,22 @@ Item {
323 phoneStage.orientation = Qt.PortraitOrientation;
323 phoneStage.orientation = Qt.PortraitOrientation;
326+ function test_focusNewTopMostAppAfterFocusedOneClosesItself() {
329+ var secondApp = ApplicationManager.get(0);
330+ tryCompare(secondApp, "state", ApplicationInfoInterface.Running);
331+ tryCompare(secondApp, "focused", true);
333+ var firstApp = ApplicationManager.get(1);
334+ tryCompare(firstApp, "state", ApplicationInfoInterface.Suspended);
335+ tryCompare(firstApp, "focused", false);
337+ ApplicationManager.stopApplication(secondApp.appId);
339+ tryCompare(firstApp, "state", ApplicationInfoInterface.Running);
340+ tryCompare(firstApp, "focused", true);