~allanlesage/unity8/dash-apps-visible-ordering

« back to all changes in this revision

Viewing changes to tests/qmltests/tst_Shell.qml

  • Committer: Allan LeSage
  • Date: 2014-04-02 17:57:38 UTC
  • mfrom: (784.1.25 unity8)
  • Revision ID: allan.lesage@canonical.com-20140402175738-ocei683rve0pj7wz
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
            while (apps.count > 0) {
118
118
                ApplicationManager.stopApplication(apps.get(0).appId);
119
119
            }
 
120
            compare(ApplicationManager.count, 0)
120
121
        }
121
122
 
122
123
        /*
187
188
            tapOnAppIconInLauncher();
188
189
            waitUntilApplicationWindowIsFullyVisible();
189
190
 
190
 
            var mainApp = ApplicationManager.focusedApplicationId;
191
 
            verify(mainApp != "");
 
191
            var mainAppId = ApplicationManager.focusedApplicationId;
 
192
            verify(mainAppId != "");
 
193
            var mainApp = ApplicationManager.findApplication(mainAppId);
 
194
            verify(mainApp);
 
195
            tryCompare(mainApp.state, ApplicationInfo.Running);
192
196
 
193
197
            // Try to suspend while proximity is engaged...
194
198
            Powerd.displayPowerStateChange(Powerd.Off, Powerd.UseProximity);
195
199
            tryCompare(greeter, "showProgress", 0);
196
200
 
197
201
            // Now really suspend
 
202
            print("suspending")
198
203
            Powerd.displayPowerStateChange(Powerd.Off, 0);
 
204
            print("done suspending")
199
205
            tryCompare(greeter, "showProgress", 1);
200
 
            tryCompare(ApplicationManager, "focusedApplicationId", "");
 
206
 
 
207
            tryCompare(ApplicationManager, "suspended", true);
 
208
            compare(mainApp.state, ApplicationInfo.Suspended);
201
209
 
202
210
            // And wake up
203
211
            Powerd.displayPowerStateChange(Powerd.On, 0);
204
 
            tryCompare(ApplicationManager, "focusedApplicationId", "");
205
212
            tryCompare(greeter, "showProgress", 1);
206
213
 
207
214
            // Swipe away greeter to focus app
208
215
            swipeAwayGreeter();
209
 
            tryCompare(ApplicationManager, "focusedApplicationId", mainApp);
 
216
            tryCompare(ApplicationManager, "suspended", false);
 
217
            compare(mainApp.state, ApplicationInfo.Running);
 
218
            tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
210
219
        }
211
220
 
212
221
        function swipeAwayGreeter() {
239
248
            tryCompare(dash, "opacity", 1.0);
240
249
 
241
250
            touchFlick(shell, touchX, touchY, shell.width * 0.1, touchY,
242
 
                       true /* beginTouch */, false /* endTouch */);
 
251
                       true /* beginTouch */, false /* endTouch */, units.gu(10), 50);
243
252
 
244
253
            // check that Dash has been scaled down and had its opacity reduced
245
254
            tryCompareFunction(function() { return dash.contentScale <= 0.9; }, true);
270
279
            tryCompare(dash, "opacity", 1.0);
271
280
 
272
281
            touchFlick(shell, touchX, touchY, shell.width * 0.1, touchY,
273
 
                       true /* beginTouch */, false /* endTouch */);
 
282
                       true /* beginTouch */, false /* endTouch */, units.gu(10), 50);
274
283
 
275
284
            // check that Dash has been scaled down and had its opacity reduced
276
285
            tryCompareFunction(function() { return dash.contentScale <= 0.9; }, true);
486
495
        }
487
496
 
488
497
        function test_DashShown(data) {
489
 
 
490
498
            if (data.greeter) {
491
499
                // Swipe the greeter in
492
500
                var greeter = findChild(shell, "greeter");