@@ -188,26 +188,34 @@ Item {
188188 tapOnAppIconInLauncher();
189189 waitUntilApplicationWindowIsFullyVisible();
190190
191− var mainApp = ApplicationManager.focusedApplicationId;
192− verify(mainApp != "");
191+ var mainAppId = ApplicationManager.focusedApplicationId;
192+ verify(mainAppId != "");
193+ var mainApp = ApplicationManager.findApplication(mainAppId);
194+ verify(mainApp);
195+ tryCompare(mainApp.state, ApplicationInfo.Running);
193196
194197 // Try to suspend while proximity is engaged...
195198 Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
196199 tryCompare(greeter, "showProgress", 0);
197200
198201 // Now really suspend
202+ print("suspending")
199203 Powerd.displayPowerStateChange(Powerd.Off, 0);
204+ print("done suspending")
200205 tryCompare(greeter, "showProgress", 1);
201− tryCompare(ApplicationManager, "focusedApplicationId", "");
206+
207+ tryCompare(ApplicationManager, "suspended", true);
208+ compare(mainApp.state, ApplicationInfo.Suspended);
202209
203210 // And wake up
204211 Powerd.displayPowerStateChange(Powerd.On, 0);
205− tryCompare(ApplicationManager, "focusedApplicationId", "");
206212 tryCompare(greeter, "showProgress", 1);
207213
208214 // Swipe away greeter to focus app
209215 swipeAwayGreeter();
210− tryCompare(ApplicationManager, "focusedApplicationId", mainApp);
216+ tryCompare(ApplicationManager, "suspended", false);
217+ compare(mainApp.state, ApplicationInfo.Running);
218+ tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
211219 }
212220
213221 function swipeAwayGreeter() {