Bug 1768074 - Stop using the second argument to ChromeUtils.import in startup marionette tests. r=mossop

Differential Revision: https://phabricator.services.mozilla.com/D145658
This commit is contained in:
Mark Banner 2022-05-09 09:42:16 +00:00
parent bc95649471
commit 23234fc18f
3 changed files with 6 additions and 3 deletions

View File

@ -133,7 +133,8 @@ class TestFissionAutostart(MarionetteTestCase):
// We're running in a function, in a sandbox, that inherits from an
// X-ray wrapped window. Anything we want to be globally available
// needs to be defined on that window.
ChromeUtils.import("resource://gre/modules/Services.jsm", window);
let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
window.Services = Services;
window.env = Cc["@mozilla.org/process/environment;1"]
.getService(Ci.nsIEnvironment);
"""

View File

@ -141,7 +141,8 @@ class TestWin32kAutostart(MarionetteTestCase):
// We're running in a function, in a sandbox, that inherits from an
// X-ray wrapped window. Anything we want to be globally available
// needs to be defined on that window.
ChromeUtils.import("resource://gre/modules/Services.jsm", window);
let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
window.Services = Services;
window.env = Cc["@mozilla.org/process/environment;1"]
.getService(Ci.nsIEnvironment);
"""

View File

@ -141,7 +141,8 @@ class TestWin32kAutostart(MarionetteTestCase):
// We're running in a function, in a sandbox, that inherits from an
// X-ray wrapped window. Anything we want to be globally available
// needs to be defined on that window.
ChromeUtils.import("resource://gre/modules/Services.jsm", window);
let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
window.Services = Services;
window.env = Cc["@mozilla.org/process/environment;1"]
.getService(Ci.nsIEnvironment);
"""