~mzanetti/unity8/fix-left-edge-on-spread

« back to all changes in this revision

Viewing changes to tests/qmltests/tst_ShellWithPin.qml

  • Committer: Michael Zanetti
  • Date: 2015-01-12 11:21:17 UTC
  • mfrom: (1459.1.85 unity8)
  • Revision ID: michael.zanetti@canonical.com-20150112112117-0x9srs9dx0ndp60g
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        signalName: "resettingDevice"
117
117
    }
118
118
 
 
119
    SignalSpy {
 
120
        id: promptSpy
 
121
        target: LightDM.Greeter
 
122
        signalName: "showPrompt"
 
123
    }
 
124
 
119
125
    Telephony.CallEntry {
120
126
        id: phoneCall
121
127
        phoneNumber: "+447812221111"
161
167
            AccountsService.enableIndicatorsWhileLocked = true
162
168
            AccountsService.demoEdges = false
163
169
            callManager.foregroundCall = null
 
170
            LightDM.Greeter.authenticate(""); // reset greeter
164
171
 
165
172
            // reload our test subject to get it in a fresh state once again
166
173
            shellLoader.active = true
471
478
 
472
479
        }
473
480
 
 
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
 
490
 
 
491
            // Create new shell
 
492
            promptSpy.clear();
 
493
            shellLoader.active = true;
 
494
            tryCompareFunction(function() {return shell !== null}, true);
 
495
 
 
496
            // Confirm that we start disabled
 
497
            compare(promptSpy.count, 0);
 
498
            verify(!shell.enabled);
 
499
 
 
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);
 
505
        }
474
506
    }
475
507
}