@@ -274,7 +274,7 @@ Item {
274 compare(ApplicationManager.focusedApplicationId, selectedApp.appId);
274 compare(ApplicationManager.focusedApplicationId, selectedApp.appId);
277− function test_orientation_change_sent_to_focused_app() {
277+ function test_orientationChangeSentToFocusedApp() {
278 phoneStage.orientation = Qt.PortraitOrientation;
278 phoneStage.orientation = Qt.PortraitOrientation;
279 addApps(1);
279 addApps(1);
@@ -286,7 +286,7 @@ Item {
286 tryCompare(app, "orientation", Qt.LandscapeOrientation);
286 tryCompare(app, "orientation", Qt.LandscapeOrientation);
289− function test_orientation_change_not_sent_to_apps_while_spread_open() {
289+ function test_orientationChangeNotSentToAppsWhileSpreadOpen() {
290 phoneStage.orientation = Qt.PortraitOrientation;
290 phoneStage.orientation = Qt.PortraitOrientation;
291 addApps(1);
291 addApps(1);
@@ -299,7 +299,7 @@ Item {
299 tryCompare(app, "orientation", Qt.PortraitOrientation);
299 tryCompare(app, "orientation", Qt.PortraitOrientation);
302− function test_orientation_change_not_sent_to_unfocused_app_until_it_focused() {
302+ function test_orientationChangeNotSentToUnfocusedAppUntilItFocused() {
303 phoneStage.orientation = Qt.PortraitOrientation;
303 phoneStage.orientation = Qt.PortraitOrientation;
304 addApps(1);
304 addApps(1);
@@ -357,5 +357,35 @@ Item {
357 tryCompare(firstApp, "state", ApplicationInfoInterface.Running);
357 tryCompare(firstApp, "state", ApplicationInfoInterface.Running);
358 tryCompare(firstApp, "focused", true);
358 tryCompare(firstApp, "focused", true);
361+ function test_cantCloseWhileSnapping() {
366+ var spreadView = findChild(phoneStage, "spreadView");
367+ var selectedApp = ApplicationManager.get(2);
371+ var app0 = findChild(spreadView, "appDelegate0");
372+ var app1 = findChild(spreadView, "appDelegate1");
373+ var app2 = findChild(spreadView, "appDelegate2");
375+ var dragArea0 = findChild(app0, "dragArea");
376+ var dragArea1 = findChild(app1, "dragArea");
377+ var dragArea2 = findChild(app2, "dragArea");
379+ compare(dragArea0.enabled, true);
380+ compare(dragArea1.enabled, true);
381+ compare(dragArea2.enabled, true);
383+ phoneStage.select(selectedApp.appId);
385+ // Make sure all drag areas are disabled instantly. Don't use tryCompare here!
386+ compare(dragArea0.enabled, false);
387+ compare(dragArea1.enabled, false);
388+ compare(dragArea2.enabled, false);