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
Родитель bc95649471
Коммит 23234fc18f
3 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -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);
"""

Просмотреть файл

@ -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);
"""

Просмотреть файл

@ -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);
"""