зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e97576127a
Коммит
6b6069c609
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче