From c1aae512a2711ea6551a3076a99f010ba83fe35f Mon Sep 17 00:00:00 2001 From: Jeremy Chen Date: Thu, 11 Jun 2015 18:25:07 +0800 Subject: [PATCH] Bug 1173706 - Let system bootup and fake app launch use the same marionette client. --- .../test/marionette/text_selection_test.js | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/apps/system/test/marionette/text_selection_test.js b/apps/system/test/marionette/text_selection_test.js index 1ffcc33435a6..cf7481b1df62 100644 --- a/apps/system/test/marionette/text_selection_test.js +++ b/apps/system/test/marionette/text_selection_test.js @@ -11,20 +11,6 @@ marionette('Text selection >', function() { apps[FakeTextSelectionApp.ORIGIN] = __dirname + '/../apps/faketextselectionapp'; - var client = marionette.client({ - apps: apps, - prefs: { - 'dom.w3c_touch_events.enabled': 1, - 'docshell.device_size_is_page_size': true, - 'dom.mozInputMethod.enabled': false - } - }); - - setup(function() { - system = client.loader.getAppClass('system'); - system.waitForFullyLoaded(); - }); - suite('without lockscreen', function() { var fakeTextselectionApp; var client = marionette.client({ @@ -38,6 +24,8 @@ marionette('Text selection >', function() { }); setup(function() { + system = client.loader.getAppClass('system'); + system.waitForFullyLoaded(); fakeTextselectionApp = new FakeTextSelectionApp(client); action = new Actions(client); }); @@ -371,8 +359,9 @@ marionette('Text selection >', function() { fakeTextselectionApp.selectAll('BugTextarea'); assert.ok(fakeTextselectionApp.bubbleVisiblity, 'bubble should show since we press selectall'); - }); + }); }); + }); suite('with lockscreen enabled', function() { var fakeTextselectionAppWithLockscreen; @@ -390,6 +379,8 @@ marionette('Text selection >', function() { }); setup(function() { + system = clientWithLockscreen.loader.getAppClass('system'); + system.waitForFullyLoaded(); fakeTextselectionAppWithLockscreen = new FakeTextSelectionApp(clientWithLockscreen); fakeTextselectionAppWithLockscreen.setTestFrame('bug'); @@ -423,7 +414,6 @@ marionette('Text selection >', function() { clientWithLockscreen.waitFor(function() { return !fakeTextselectionAppWithLockscreen.bubbleVisiblity; }); - }); }); }); });