~feng-kylin/unity8/fix-lp1413791

« back to all changes in this revision

Viewing changes to tests/qmltests/tst_ShellWithPin.qml

  • Committer: Michael Zanetti
  • Date: 2015-06-17 12:14:27 UTC
  • mfrom: (1595.1.214 unity8)
  • mto: (1595.1.232 unity8)
  • mto: This revision was merged to the branch mainline in revision 1608.
  • Revision ID: michael.zanetti@canonical.com-20150617121427-lgc70azrbtsanejb
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2014 Canonical, Ltd.
 
2
 * Copyright (C) 2014-2015 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
69
69
            property bool itemDestroyed: false
70
70
            sourceComponent: Component {
71
71
                Shell {
72
 
                    property string indicatorProfile: "phone"
73
 
 
74
72
                    Component.onDestruction: {
75
73
                        shellLoader.itemDestroyed = true
76
74
                    }
397
395
            var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader")
398
396
 
399
397
            // We start in phone mode
400
 
            tryCompare(shell, "sideStageEnabled", false)
401
 
            tryCompare(applicationsDisplayLoader, "tabletMode", false)
 
398
            compare(shell.usageScenario, "phone");
 
399
            compare(applicationsDisplayLoader.usageScenario, "phone");
402
400
 
403
401
            var lockscreen = findChild(shell, "lockscreen")
404
402
            lockscreen.emergencyCall()
405
403
            confirmLockedApp("dialer-app")
406
404
 
407
405
            // OK, we're in. Now try (but fail) to switch to tablet mode
408
 
            shell.tablet = true
409
 
            tryCompare(shell, "sideStageEnabled", true)
410
 
            tryCompare(applicationsDisplayLoader, "tabletMode", false)
 
406
            shell.usageScenario = "tablet";
 
407
            compare(applicationsDisplayLoader.usageScenario, "phone");
411
408
 
412
409
            // And when we kill the app, we go back to locked tablet mode
413
410
            killApps()
414
411
            var greeter = findChild(shell, "greeter")
415
412
            tryCompare(greeter, "fullyShown", true)
416
 
            tryCompare(shell, "sideStageEnabled", true)
417
 
            tryCompare(applicationsDisplayLoader, "tabletMode", true)
 
413
            compare(applicationsDisplayLoader.usageScenario, "tablet");
418
414
        }
419
415
 
420
416
        function test_emergencyDialerIncoming() {