@@ -195,9 +195,9 @@ Item {
195195 !runningApplicationsGrid.terminationModeEnabled
196196 }
197197
198− // While on termination mode, clicking a running application tile causes the
199− // corresponding application to be terminated.
200− function test_clickTileToTerminateApp() {
198+ // While on termination mode, clicking a running application tile, outside of
199+ // the close icon should do nothing
200+ function test_clickTileNotClose() {
201201 runningApplicationsGrid.terminationModeEnabled = true
202202
203203 var calendarTile = findChild(runningApplicationsGrid, "runningAppTile Calendar")
@@ -207,10 +207,30 @@ Item {
207207
208208 mouseClick(calendarTile, calendarTile.width/2, calendarTile.height/2)
209209
210+ verify(fakeRunningAppsModel.contains("calendar"))
211+
212+ // The tile for the Calendar app should stay there
213+ tryCompareFunction(checkCalendarTileExists, true)
214+ }
215+
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+
210230 verify(!fakeRunningAppsModel.contains("calendar"))
211231
212232 // The tile for the Calendar app should eventually vanish since the
213− // application has been terminated
233+ // application has been terminated.
214234 tryCompareFunction(checkCalendarTileExists, false)
215235 }
216236