forked from mirrors/gecko-dev
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:
parent
e97576127a
commit
6b6069c609
8 changed files with 18 additions and 18 deletions
|
|
@ -604,7 +604,7 @@ export class Runtime extends ContentProcessDomain {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fromConsoleAPI(message) {
|
function fromConsoleAPI(message) {
|
||||||
// From sendConsoleAPIMessage (toolkit/modules/Console.jsm)
|
// From sendConsoleAPIMessage (toolkit/modules/Console.sys.mjs)
|
||||||
return {
|
return {
|
||||||
arguments: message.arguments,
|
arguments: message.arguments,
|
||||||
innerWindowId: message.innerID,
|
innerWindowId: message.innerID,
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ export class Branch {
|
||||||
* `LogBranch` specialisation deserialises the string value to the
|
* `LogBranch` specialisation deserialises the string value to the
|
||||||
* correct `Log.Level` by sanitising the input data first.
|
* 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
|
* in Marionette. See https://bugzilla.mozilla.org/show_bug.cgi?id=1357517
|
||||||
* for further details.
|
* for further details.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ XPCOMUtils.defineLazyGetter(lazy, "prefLogLevel", () => {
|
||||||
return PREF_REMOTE_LOG_LEVEL;
|
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 {
|
export class Log {
|
||||||
static TYPES = {
|
static TYPES = {
|
||||||
CDP: "CDP",
|
CDP: "CDP",
|
||||||
|
|
@ -71,7 +71,7 @@ export class Log {
|
||||||
}
|
}
|
||||||
|
|
||||||
static get verbose() {
|
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
|
// see ../browser/base/content/test/performance/browser_startup.js
|
||||||
const level = Services.prefs.getStringPref(PREF_REMOTE_LOG_LEVEL, "Info");
|
const level = Services.prefs.getStringPref(PREF_REMOTE_LOG_LEVEL, "Info");
|
||||||
return StdLog.Level[level] >= StdLog.Level.Info;
|
return StdLog.Level[level] >= StdLog.Level.Info;
|
||||||
|
|
|
||||||
|
|
@ -769,8 +769,8 @@ class Marionette(object):
|
||||||
with self.using_context(self.CONTEXT_CHROME):
|
with self.using_context(self.CONTEXT_CHROME):
|
||||||
self.execute_script(
|
self.execute_script(
|
||||||
"""
|
"""
|
||||||
const { Preferences } = ChromeUtils.import(
|
const { Preferences } = ChromeUtils.importESModules(
|
||||||
"resource://gre/modules/Preferences.jsm"
|
"resource://gre/modules/Preferences.sys.mjs"
|
||||||
);
|
);
|
||||||
Preferences.reset(arguments[0]);
|
Preferences.reset(arguments[0]);
|
||||||
""",
|
""",
|
||||||
|
|
@ -796,8 +796,8 @@ class Marionette(object):
|
||||||
with self.using_context(self.CONTEXT_CHROME):
|
with self.using_context(self.CONTEXT_CHROME):
|
||||||
pref_value = self.execute_script(
|
pref_value = self.execute_script(
|
||||||
"""
|
"""
|
||||||
const { Preferences } = ChromeUtils.import(
|
const { Preferences } = ChromeUtils.importESModules(
|
||||||
"resource://gre/modules/Preferences.jsm"
|
"resource://gre/modules/Preferences.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
let pref = arguments[0];
|
let pref = arguments[0];
|
||||||
|
|
@ -835,8 +835,8 @@ class Marionette(object):
|
||||||
|
|
||||||
self.execute_script(
|
self.execute_script(
|
||||||
"""
|
"""
|
||||||
const { Preferences } = ChromeUtils.import(
|
const { Preferences } = ChromeUtils.importESModules(
|
||||||
"resource://gre/modules/Preferences.jsm"
|
"resource://gre/modules/Preferences.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
let pref = arguments[0];
|
let pref = arguments[0];
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ class MockMozCrash(object):
|
||||||
with self.marionette.using_context("chrome"):
|
with self.marionette.using_context("chrome"):
|
||||||
self.crash_reporter_enabled = self.marionette.execute_script(
|
self.crash_reporter_enabled = self.marionette.execute_script(
|
||||||
"""
|
"""
|
||||||
const { AppConstants } = ChromeUtils.import(
|
const { AppConstants } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
return AppConstants.MOZ_CRASHREPORTER;
|
return AppConstants.MOZ_CRASHREPORTER;
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,8 @@ class BaseNavigationTestCase(WindowManagerMixin, MarionetteTestCase):
|
||||||
# TODO: DO NOT USE MOST RECENT WINDOW BUT CURRENT ONE
|
# TODO: DO NOT USE MOST RECENT WINDOW BUT CURRENT ONE
|
||||||
return self.marionette.execute_script(
|
return self.marionette.execute_script(
|
||||||
"""
|
"""
|
||||||
const { AppConstants } = ChromeUtils.import(
|
const { AppConstants } = ChromeUtils.importESModule(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
let win = null;
|
let win = null;
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ class TestProxyCapabilities(MarionetteTestCase):
|
||||||
with self.marionette.using_context("chrome"):
|
with self.marionette.using_context("chrome"):
|
||||||
self.marionette.execute_script(
|
self.marionette.execute_script(
|
||||||
"""
|
"""
|
||||||
const { Preferences } = ChromeUtils.import(
|
const { Preferences } = ChromeUtils.importESModules(
|
||||||
"resource://gre/modules/Preferences.jsm"
|
"resource://gre/modules/Preferences.sys.mjs"
|
||||||
);
|
);
|
||||||
Preferences.resetBranch("network.proxy");
|
Preferences.resetBranch("network.proxy");
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@ class TestSwitchToWindowContent(WindowManagerMixin, MarionetteTestCase):
|
||||||
with self.marionette.using_context("chrome"):
|
with self.marionette.using_context("chrome"):
|
||||||
return self.marionette.execute_script(
|
return self.marionette.execute_script(
|
||||||
"""
|
"""
|
||||||
const { AppConstants } = ChromeUtils.import(
|
const { AppConstants } = ChromeUtils.importESModules(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
let win = null;
|
let win = null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue