@@ -649,5 +649,22 @@ Item {
649649 // only unity8-dash surface is left
650650 compare(topLevelSurfaceList.count, 1);
651651 }
652+
653+
654+ /*
655+ Check that when an application starts while the spread is open, the
656+ spread closes and that new app is brought to front (gets focused).
657+ */
658+ function test_launchAppWithSpreadOpen()
659+ {
660+ performEdgeSwipeToShowAppSpread();
661+
662+ var webbrowserSurfaceId = topLevelSurfaceList.nextId;
663+ var webbrowserApp = ApplicationManager.startApplication("webbrowser-app");
664+ waitUntilAppSurfaceShowsUp(webbrowserSurfaceId);
665+
666+ compare(topLevelSurfaceList.idAt(0), webbrowserSurfaceId);
667+ compare(webbrowserApp.focused, true);
668+ }
652669 }
653670}