on xenial help sign in
And update suspend qmltest
3c5f8cdMichael Terry
tests/qmltests/tst_Shell.qml+7−3
@@ -125,13 +125,17 @@ Item {
125 var mainApp = ApplicationManager.mainStageFocusedApplication;
125 var mainApp = ApplicationManager.mainStageFocusedApplication;
126 tryCompareFunction(function() { return mainApp != null; }, true);
126 tryCompareFunction(function() { return mainApp != null; }, true);
127
127
128+ // Try to suspend while proximity is engaged...
129+ Powerd.displayPowerStateChange(0, 1);
130+ tryCompare(greeter, "showProgress", 0);
131+
128− // Now suspend
132+ // Now really suspend
129− Powerd.powerStateChange(0);
133+ Powerd.displayPowerStateChange(0, 0);
130 tryCompare(greeter, "showProgress", 1);
134 tryCompare(greeter, "showProgress", 1);
131 tryCompare(ApplicationManager, "mainStageFocusedApplication", null);
135 tryCompare(ApplicationManager, "mainStageFocusedApplication", null);
132
136
133 // And wake up
137 // And wake up
134− Powerd.powerStateChange(1);
138+ Powerd.displayPowerStateChange(1, 0);
135 tryCompare(ApplicationManager, "mainStageFocusedApplication", mainApp);
139 tryCompare(ApplicationManager, "mainStageFocusedApplication", mainApp);
136 tryCompare(greeter, "showProgress", 1);
140 tryCompare(greeter, "showProgress", 1);
137 }
141 }