@@ -155,6 +155,7 @@ Item {
155 AccountsService.enableLauncherWhileLocked = true
155 AccountsService.enableLauncherWhileLocked = true
156 AccountsService.enableIndicatorsWhileLocked = true
156 AccountsService.enableIndicatorsWhileLocked = true
157 AccountsService.demoEdges = false
157 AccountsService.demoEdges = false
158+ callManager.foregroundCall = null
159 // reload our test subject to get it in a fresh state once again
160 // reload our test subject to get it in a fresh state once again
160 shellLoader.active = true
161 shellLoader.active = true
@@ -207,6 +208,7 @@ Item {
207 tryCompare(lockscreen, "shown", false)
208 tryCompare(lockscreen, "shown", false)
208 tryCompare(greeter, "hasLockedApp", true)
209 tryCompare(greeter, "hasLockedApp", true)
209 tryCompare(greeter, "lockedApp", app)
210 tryCompare(greeter, "lockedApp", app)
211+ tryCompare(LightDM.Greeter, "active", true)
210 tryCompare(ApplicationManager, "focusedApplicationId", app)
212 tryCompare(ApplicationManager, "focusedApplicationId", app)
@@ -381,5 +383,61 @@ Item {
381 callManager.foregroundCall = phoneCall
383 callManager.foregroundCall = phoneCall
382 confirmLockedApp("dialer-app")
384 confirmLockedApp("dialer-app")
387+ function test_emergencyDialerActiveCallPanel() {
388+ // Make sure that the following sequence works:
389+ // - Enter emergency mode call
390+ // - Return to greeter
391+ // - Click on active call panel
392+ // - Should be back in emergency mode dialer
394+ var greeter = findChild(shell, "greeter");
395+ var lockscreen = findChild(shell, "lockscreen");
397+ lockscreen.emergencyCall();
398+ confirmLockedApp("dialer-app");
399+ callManager.foregroundCall = phoneCall;
401+ LightDM.Greeter.showGreeter();
402+ tryCompare(lockscreen, "shown", true);
403+ tryCompare(greeter, "hasLockedApp", false);
405+ // simulate a callHint press, the real thing requires dialer: url support
406+ ApplicationManager.requestFocusApplication("dialer-app");
408+ confirmLockedApp("dialer-app");
411+ function test_normalDialerActiveCallPanel() {
412+ // Make sure that the following sequence works:
416+ // - Click on active call panel
417+ // - Should be back in normal dialer
418+ // (we've had a bug where we locked screen in this case)
420+ var lockscreen = findChild(shell, "lockscreen");
421+ var panel = findChild(shell, "panel");
424+ tryCompare(lockscreen, "shown", false);
425+ tryCompare(LightDM.Greeter, "active", false);
427+ ApplicationManager.startApplication("dialer-app", ApplicationManager.NoFlag);
428+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
429+ callManager.foregroundCall = phoneCall;
431+ ApplicationManager.requestFocusApplication("unity8-dash");
432+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
433+ tryCompare(panel.callHint, "visible", true);
435+ // simulate a callHint press, the real thing requires dialer: url support
436+ ApplicationManager.requestFocusApplication("dialer-app");
438+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
439+ tryCompare(lockscreen, "shown", false);
440+ tryCompare(LightDM.Greeter, "active", false);