@@ -286,6 +286,12 @@ Rectangle {
286 signalName: "actionInvoked"
286 signalName: "actionInvoked"
291+ target: ApplicationManager
292+ signalName: "applicationRemoved"
289 Telephony.CallEntry {
295 Telephony.CallEntry {
290 id: phoneCall
296 id: phoneCall
291 phoneNumber: "+447812221111"
297 phoneNumber: "+447812221111"
@@ -1443,5 +1449,41 @@ Rectangle {
1444 keyRelease(Qt.Key_Control);
1450 keyRelease(Qt.Key_Control);
1453+ function test_closeFromSpread() {
1454+ loadDesktopShellWithApps()
1456+ var appRepeater = findInvisibleChild(shell, "appRepeater");
1457+ verify(appRepeater !== null);
1459+ keyPress(Qt.Key_Control)
1460+ keyClick(Qt.Key_Tab);
1462+ appRemovedSpy.clear();
1464+ var closedAppId = ApplicationManager.get(2).appId;
1465+ var appDelegate2 = appRepeater.itemAt(2);
1466+ var closeMouseArea = findChild(appDelegate2, "closeMouseArea");
1468+ // Move the mosue over tile 2 and verify the close button becomes visible
1470+ var y = shell.height * .5;
1471+ mouseMove(shell, x, y)
1472+ while (appRepeater.highlightedIndex !== 2 && x <= 4000) {
1474+ mouseMove(shell, x, y)
1475+ waitForRendering(shell)
1477+ tryCompare(closeMouseArea, "enabled", true)
1479+ // Close the app using the close button
1480+ mouseClick(closeMouseArea, closeMouseArea.width / 2, closeMouseArea.height / 2)
1482+ // Verify applicationRemoved has been emitted correctly
1483+ tryCompare(appRemovedSpy, "count", 1)
1484+ compare(appRemovedSpy.signalArguments[0][0], closedAppId);
1486+ keyRelease(Qt.Key_Control);