@@ -160,6 +160,7 @@ Item {
160 AccountsService.enableLauncherWhileLocked = true
160 AccountsService.enableLauncherWhileLocked = true
161 AccountsService.enableIndicatorsWhileLocked = true
161 AccountsService.enableIndicatorsWhileLocked = true
162 AccountsService.demoEdges = false
162 AccountsService.demoEdges = false
163+ callManager.foregroundCall = null
164 // reload our test subject to get it in a fresh state once again
165 // reload our test subject to get it in a fresh state once again
165 shellLoader.active = true
166 shellLoader.active = true
@@ -212,6 +213,7 @@ Item {
212 tryCompare(lockscreen, "shown", false)
213 tryCompare(lockscreen, "shown", false)
213 tryCompare(greeter, "hasLockedApp", true)
214 tryCompare(greeter, "hasLockedApp", true)
214 tryCompare(greeter, "lockedApp", app)
215 tryCompare(greeter, "lockedApp", app)
216+ tryCompare(LightDM.Greeter, "active", true)
215 tryCompare(ApplicationManager, "focusedApplicationId", app)
217 tryCompare(ApplicationManager, "focusedApplicationId", app)
@@ -386,5 +388,61 @@ Item {
386 callManager.foregroundCall = phoneCall
388 callManager.foregroundCall = phoneCall
387 confirmLockedApp("dialer-app")
389 confirmLockedApp("dialer-app")
392+ function test_emergencyDialerActiveCallPanel() {
393+ // Make sure that the following sequence works:
394+ // - Enter emergency mode call
395+ // - Return to greeter
396+ // - Click on active call panel
397+ // - Should be back in emergency mode dialer
399+ var greeter = findChild(shell, "greeter");
400+ var lockscreen = findChild(shell, "lockscreen");
402+ lockscreen.emergencyCall();
403+ confirmLockedApp("dialer-app");
404+ callManager.foregroundCall = phoneCall;
406+ LightDM.Greeter.showGreeter();
407+ tryCompare(lockscreen, "shown", true);
408+ tryCompare(greeter, "hasLockedApp", false);
410+ // simulate a callHint press, the real thing requires dialer: url support
411+ ApplicationManager.requestFocusApplication("dialer-app");
413+ confirmLockedApp("dialer-app");
416+ function test_normalDialerActiveCallPanel() {
417+ // Make sure that the following sequence works:
421+ // - Click on active call panel
422+ // - Should be back in normal dialer
423+ // (we've had a bug where we locked screen in this case)
425+ var lockscreen = findChild(shell, "lockscreen");
426+ var panel = findChild(shell, "panel");
429+ tryCompare(lockscreen, "shown", false);
430+ tryCompare(LightDM.Greeter, "active", false);
432+ ApplicationManager.startApplication("dialer-app", ApplicationManager.NoFlag);
433+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
434+ callManager.foregroundCall = phoneCall;
436+ ApplicationManager.requestFocusApplication("unity8-dash");
437+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
438+ tryCompare(panel.callHint, "visible", true);
440+ // simulate a callHint press, the real thing requires dialer: url support
441+ ApplicationManager.requestFocusApplication("dialer-app");
443+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
444+ tryCompare(lockscreen, "shown", false);
445+ tryCompare(LightDM.Greeter, "active", false);