@@ -1454,8 +1454,8 @@ Rectangle {
14541454 var spreadView = findChild(shell, "spreadView");
14551455 verify(spreadView);
14561456
1457− verify(ApplicationManager.count >= 2);
1458− var previousApp = ApplicationManager.get(1);
1457+ verify(topLevelSurfaceList.count >= 2);
1458+ var previousSurfaceId = topLevelSurfaceList.idAt(1);
14591459
14601460 var touchStartX = shell.width - 1;
14611461 var touchStartY = shell.height / 2;
@@ -1481,7 +1481,7 @@ Rectangle {
14811481 // ensure the app switch animation has ended
14821482 tryCompare(spreadView, "shiftedContentX", 0);
14831483
1484− compare(ApplicationManager.get(0).appId, previousApp.appId);
1484+ tryCompareFunction(function(){ return topLevelSurfaceList.idAt(0); }, previousSurfaceId);
14851485 }
14861486
14871487 function performEdgeSwipeToShowAppSpread() {