Bug 1795322 - Update toolkit modules references in marionette related code. r=whimboo,webdriver-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D160026
This commit is contained in:
Mark Banner 2022-10-25 19:49:24 +00:00
Родитель e97576127a
Коммит 6b6069c609
8 изменённых файлов: 18 добавлений и 18 удалений

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

@ -604,7 +604,7 @@ export class Runtime extends ContentProcessDomain {
}
function fromConsoleAPI(message) {
// From sendConsoleAPIMessage (toolkit/modules/Console.jsm)
// From sendConsoleAPIMessage (toolkit/modules/Console.sys.mjs)
return {
arguments: message.arguments,
innerWindowId: message.innerID,

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

@ -110,7 +110,7 @@ export class Branch {
* `LogBranch` specialisation deserialises the string value to the
* correct `Log.Level` by sanitising the input data first.
*
* A further complication is that we cannot rely on `Preferences.jsm`
* A further complication is that we cannot rely on `Preferences.sys.mjs`
* in Marionette. See https://bugzilla.mozilla.org/show_bug.cgi?id=1357517
* for further details.
*/

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

@ -34,7 +34,7 @@ XPCOMUtils.defineLazyGetter(lazy, "prefLogLevel", () => {
return PREF_REMOTE_LOG_LEVEL;
});
/** E10s compatible wrapper for the standard logger from Log.jsm. */
/** E10s compatible wrapper for the standard logger from Log.sys.mjs. */
export class Log {
static TYPES = {
CDP: "CDP",
@ -71,7 +71,7 @@ export class Log {
}
static get verbose() {
// we can't use Preferences.jsm before first paint,
// we can't use Preferences.sys.mjs before first paint,
// see ../browser/base/content/test/performance/browser_startup.js
const level = Services.prefs.getStringPref(PREF_REMOTE_LOG_LEVEL, "Info");
return StdLog.Level[level] >= StdLog.Level.Info;

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

@ -769,8 +769,8 @@ class Marionette(object):
with self.using_context(self.CONTEXT_CHROME):
self.execute_script(
"""
const { Preferences } = ChromeUtils.import(
"resource://gre/modules/Preferences.jsm"
const { Preferences } = ChromeUtils.importESModules(
"resource://gre/modules/Preferences.sys.mjs"
);
Preferences.reset(arguments[0]);
""",
@ -796,8 +796,8 @@ class Marionette(object):
with self.using_context(self.CONTEXT_CHROME):
pref_value = self.execute_script(
"""
const { Preferences } = ChromeUtils.import(
"resource://gre/modules/Preferences.jsm"
const { Preferences } = ChromeUtils.importESModules(
"resource://gre/modules/Preferences.sys.mjs"
);
let pref = arguments[0];
@ -835,8 +835,8 @@ class Marionette(object):
self.execute_script(
"""
const { Preferences } = ChromeUtils.import(
"resource://gre/modules/Preferences.jsm"
const { Preferences } = ChromeUtils.importESModules(
"resource://gre/modules/Preferences.sys.mjs"
);
let pref = arguments[0];

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

@ -33,8 +33,8 @@ class MockMozCrash(object):
with self.marionette.using_context("chrome"):
self.crash_reporter_enabled = self.marionette.execute_script(
"""
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
const { AppConstants } = ChromeUtils.importESModule(
"resource://gre/modules/AppConstants.sys.mjs"
);
return AppConstants.MOZ_CRASHREPORTER;
"""

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

@ -78,8 +78,8 @@ class BaseNavigationTestCase(WindowManagerMixin, MarionetteTestCase):
# TODO: DO NOT USE MOST RECENT WINDOW BUT CURRENT ONE
return self.marionette.execute_script(
"""
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
const { AppConstants } = ChromeUtils.importESModule(
"resource://gre/modules/AppConstants.sys.mjs"
);
let win = null;

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

@ -22,8 +22,8 @@ class TestProxyCapabilities(MarionetteTestCase):
with self.marionette.using_context("chrome"):
self.marionette.execute_script(
"""
const { Preferences } = ChromeUtils.import(
"resource://gre/modules/Preferences.jsm"
const { Preferences } = ChromeUtils.importESModules(
"resource://gre/modules/Preferences.sys.mjs"
);
Preferences.resetBranch("network.proxy");
"""

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

@ -42,8 +42,8 @@ class TestSwitchToWindowContent(WindowManagerMixin, MarionetteTestCase):
with self.marionette.using_context("chrome"):
return self.marionette.execute_script(
"""
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
const { AppConstants } = ChromeUtils.importESModules(
"resource://gre/modules/AppConstants.sys.mjs"
);
let win = null;