@@ -213,6 +213,28 @@ Item {
213213 tryCompareFunction(checkCalendarTileExists, true)
214214 }
215215
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
220+
221+ var calendarTile = findChild(runningApplicationsGrid, "runningAppTile Calendar")
222+ var calendarTileCloseButton = findChild(runningApplicationsGrid, "closeIcon Calendar")
223+
224+ verify(calendarTile != undefined)
225+ verify(calendarTileCloseButton != undefined)
226+ verify(fakeRunningAppsModel.contains("calendar"))
227+
228+ mouseClick(calendarTileCloseButton, calendarTileCloseButton.width/2, calendarTileCloseButton.height/2)
229+
230+ verify(!fakeRunningAppsModel.contains("calendar"))
231+
232+ // The tile for the Calendar app should eventually vanish since the
233+ // application has been terminated.
234+ tryCompareFunction(checkCalendarTileExists, false)
235+
236+ }
237+
216238 function checkCalendarTileExists() {
217239 return findChild(runningApplicationsGrid, "runningAppTile Calendar")
218240 != undefined