@@ -213,6 +213,28 @@ Item {
213 tryCompareFunction(checkCalendarTileExists, true)
213 tryCompareFunction(checkCalendarTileExists, true)
216+ // While in termination mode, clicking on a running application tile's close icon
217+ // causes the corresponding application to be terminated
218+ function test_clickCloseIconToTerminateApp() {
219+ runningApplicationsGrid.terminationModeEnabled = true
221+ var calendarTile = findChild(runningApplicationsGrid, "runningAppTile Calendar")
222+ var calendarTileCloseButton = findChild(runningApplicationsGrid, "closeIcon Calendar")
224+ verify(calendarTile != undefined)
225+ verify(calendarTileCloseButton != undefined)
226+ verify(fakeRunningAppsModel.contains("calendar"))
228+ mouseClick(calendarTileCloseButton, calendarTileCloseButton.width/2, calendarTileCloseButton.height/2)
230+ verify(!fakeRunningAppsModel.contains("calendar"))
232+ // The tile for the Calendar app should eventually vanish since the
233+ // application has been terminated.
234+ tryCompareFunction(checkCalendarTileExists, false)
216 function checkCalendarTileExists() {
238 function checkCalendarTileExists() {
217 return findChild(runningApplicationsGrid, "runningAppTile Calendar")
239 return findChild(runningApplicationsGrid, "runningAppTile Calendar")
218 != undefined
240 != undefined