@@ -116,6 +116,12 @@ Item {
116 signalName: "resettingDevice"
116 signalName: "resettingDevice"
121+ target: LightDM.Greeter
122+ signalName: "showPrompt"
119 Telephony.CallEntry {
125 Telephony.CallEntry {
120 id: phoneCall
126 id: phoneCall
121 phoneNumber: "+447812221111"
127 phoneNumber: "+447812221111"
@@ -472,5 +478,30 @@ Item {
481+ /* We had a bug (1395075) where if a user kept swiping as the greeter
482+ loaded, they would be able to get into the session before the
483+ lockscreen appeared. Make sure that doesn't happen. */
484+ function test_earlyDisable() {
485+ // Kill current shell
486+ shellLoader.itemDestroyed = false;
487+ shellLoader.active = false;
488+ tryCompare(shellLoader, "itemDestroyed", true);
489+ LightDM.Greeter.authenticate(""); // reset greeter
493+ shellLoader.active = true;
494+ tryCompareFunction(function() {return shell !== null}, true);
496+ // Confirm that we start disabled
497+ compare(promptSpy.count, 0);
498+ verify(!shell.enabled);
500+ // And that we only become enabled once the lockscreen is up
501+ tryCompare(shell, "enabled", true);
502+ verify(promptSpy.count > 0);
503+ var lockscreen = findChild(shell, "lockscreen");
504+ verify(lockscreen.shown);