forked from mirrors/gecko-dev
Bug 1790472 - [bidi] Convert /remote/webdriver-bidi JSM modules to ESM r=webdriver-reviewers,whimboo
Depends on D158296 Differential Revision: https://phabricator.services.mozilla.com/D158297
This commit is contained in:
parent
4a1ddfd485
commit
3635b10bad
23 changed files with 94 additions and 247 deletions
|
|
@ -9,12 +9,12 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
Deferred: "chrome://remote/content/shared/Sync.sys.mjs",
|
||||
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
||||
WebDriverBiDi: "chrome://remote/content/webdriver-bidi/WebDriverBiDi.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
CDP: "chrome://remote/content/cdp/CDP.jsm",
|
||||
HttpServer: "chrome://remote/content/server/HTTPD.jsm",
|
||||
WebDriverBiDi: "chrome://remote/content/webdriver-bidi/WebDriverBiDi.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
|
|
|
|||
|
|
@ -16,12 +16,13 @@ const protocols = {
|
|||
bidi: {},
|
||||
test: {},
|
||||
};
|
||||
XPCOMUtils.defineLazyModuleGetters(protocols.bidi, {
|
||||
// eslint-disable-next-line mozilla/lazy-getter-object-name
|
||||
ChromeUtils.defineESModuleGetters(protocols.bidi, {
|
||||
// Additional protocols might use a different registry for their modules,
|
||||
// in which case this will no longer be a constant but will instead depend on
|
||||
// the protocol owning the MessageHandler. See Bug 1722464.
|
||||
getModuleClass:
|
||||
"chrome://remote/content/webdriver-bidi/modules/ModuleRegistry.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/ModuleRegistry.sys.mjs",
|
||||
});
|
||||
// eslint-disable-next-line mozilla/lazy-getter-object-name
|
||||
ChromeUtils.defineESModuleGetters(protocols.test, {
|
||||
|
|
|
|||
|
|
@ -16,15 +16,12 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
"chrome://remote/content/shared/messagehandler/RootMessageHandler.sys.mjs",
|
||||
RootMessageHandlerRegistry:
|
||||
"chrome://remote/content/shared/messagehandler/RootMessageHandlerRegistry.sys.mjs",
|
||||
WebDriverBiDiConnection:
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.sys.mjs",
|
||||
WebSocketHandshake:
|
||||
"chrome://remote/content/server/WebSocketHandshake.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
WebDriverBiDiConnection:
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "logger", () => lazy.Log.get());
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,30 +2,19 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["WebDriverNewSessionHandler"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
WebDriverBiDiConnection:
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.sys.mjs",
|
||||
WebSocketHandshake:
|
||||
"chrome://remote/content/server/WebSocketHandshake.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
WebDriverBiDiConnection:
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
* httpd.js JSON handler for direct BiDi connections.
|
||||
*/
|
||||
class WebDriverNewSessionHandler {
|
||||
export class WebDriverNewSessionHandler {
|
||||
/**
|
||||
* Construct a new JSON handler.
|
||||
*
|
||||
|
|
@ -2,13 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["Realm", "RealmType", "WindowRealm"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
|
|
@ -31,7 +25,7 @@ XPCOMUtils.defineLazyGetter(lazy, "dbg", () => {
|
|||
* @readonly
|
||||
* @enum {RealmType}
|
||||
**/
|
||||
const RealmType = {
|
||||
export const RealmType = {
|
||||
AudioWorklet: "audio-worklet",
|
||||
DedicatedWorker: "dedicated-worker",
|
||||
PaintWorklet: "paint-worklet",
|
||||
|
|
@ -52,7 +46,7 @@ function getUUID() {
|
|||
/**
|
||||
* Base class that wraps any kind of WebDriver BiDi realm.
|
||||
*/
|
||||
class Realm {
|
||||
export class Realm {
|
||||
#handleObjectMap;
|
||||
#id;
|
||||
|
||||
|
|
@ -150,7 +144,7 @@ class Realm {
|
|||
/**
|
||||
* Wrapper for Window realms including sandbox objects.
|
||||
*/
|
||||
class WindowRealm extends Realm {
|
||||
export class WindowRealm extends Realm {
|
||||
#globalObject;
|
||||
#globalObjectReference;
|
||||
#sandboxName;
|
||||
|
|
@ -2,18 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = [
|
||||
"deserialize",
|
||||
"OwnershipModel",
|
||||
"serialize",
|
||||
"stringify",
|
||||
];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -37,7 +26,7 @@ XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
|||
* @readonly
|
||||
* @enum {OwnershipModel}
|
||||
**/
|
||||
const OwnershipModel = {
|
||||
export const OwnershipModel = {
|
||||
None: "none",
|
||||
Root: "root",
|
||||
};
|
||||
|
|
@ -201,7 +190,7 @@ function deserializeKeyValueList(realm, serializedKeyValueList) {
|
|||
*
|
||||
* @return {Object} Deserialized representation of the value.
|
||||
*/
|
||||
function deserialize(realm, serializedValue) {
|
||||
export function deserialize(realm, serializedValue) {
|
||||
const { handle, type, value } = serializedValue;
|
||||
|
||||
// With a handle present deserialize as remote reference.
|
||||
|
|
@ -458,7 +447,7 @@ function serializeMapping(
|
|||
*
|
||||
* @return {Object} Serialized representation of the value.
|
||||
*/
|
||||
function serialize(
|
||||
export function serialize(
|
||||
value,
|
||||
maxDepth,
|
||||
ownershipType,
|
||||
|
|
@ -639,7 +628,7 @@ function setInternalIdsIfNeeded(serializationInternalMap, remoteValue, object) {
|
|||
*
|
||||
* @return {string} String representation of the value.
|
||||
*/
|
||||
function stringify(obj) {
|
||||
export function stringify(obj) {
|
||||
let text;
|
||||
try {
|
||||
text =
|
||||
|
|
@ -2,25 +2,16 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["WebDriverBiDi"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
|
||||
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
||||
WebDriverSession: "chrome://remote/content/shared/webdriver/Session.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
WebDriverNewSessionHandler:
|
||||
"chrome://remote/content/webdriver-bidi/NewSessionHandler.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/NewSessionHandler.sys.mjs",
|
||||
WebDriverSession: "chrome://remote/content/shared/webdriver/Session.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
||||
|
|
@ -33,7 +24,7 @@ XPCOMUtils.defineLazyGetter(lazy, "textEncoder", () => new TextEncoder());
|
|||
*
|
||||
* @see https://w3c.github.io/webdriver-bidi
|
||||
*/
|
||||
class WebDriverBiDi {
|
||||
export class WebDriverBiDi {
|
||||
/**
|
||||
* Creates a new instance of the WebDriverBiDi class.
|
||||
*
|
||||
|
|
@ -2,17 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["splitMethod", "WebDriverBiDiConnection"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { WebSocketConnection } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/WebSocketConnection.sys.mjs"
|
||||
);
|
||||
import { WebSocketConnection } from "chrome://remote/content/shared/WebSocketConnection.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -27,7 +19,7 @@ XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
|||
lazy.Log.get(lazy.Log.TYPES.WEBDRIVER_BIDI)
|
||||
);
|
||||
|
||||
class WebDriverBiDiConnection extends WebSocketConnection {
|
||||
export class WebDriverBiDiConnection extends WebSocketConnection {
|
||||
/**
|
||||
* @param {WebSocket} webSocket
|
||||
* The WebSocket server connection to wrap.
|
||||
|
|
@ -194,7 +186,7 @@ class WebDriverBiDiConnection extends WebSocketConnection {
|
|||
* Object with the module ("session") and command ("subscribe")
|
||||
* as properties.
|
||||
*/
|
||||
function splitMethod(method) {
|
||||
export function splitMethod(method) {
|
||||
const parts = method.split(".");
|
||||
|
||||
if (parts.length != 2 || !parts[0].length || !parts[1].length) {
|
||||
|
|
@ -5,26 +5,26 @@
|
|||
remote.jar:
|
||||
% content remote %content/
|
||||
|
||||
content/webdriver-bidi/NewSessionHandler.jsm (NewSessionHandler.jsm)
|
||||
content/webdriver-bidi/Realm.jsm (Realm.jsm)
|
||||
content/webdriver-bidi/RemoteValue.jsm (RemoteValue.jsm)
|
||||
content/webdriver-bidi/WebDriverBiDi.jsm (WebDriverBiDi.jsm)
|
||||
content/webdriver-bidi/WebDriverBiDiConnection.jsm (WebDriverBiDiConnection.jsm)
|
||||
content/webdriver-bidi/NewSessionHandler.sys.mjs (NewSessionHandler.sys.mjs)
|
||||
content/webdriver-bidi/Realm.sys.mjs (Realm.sys.mjs)
|
||||
content/webdriver-bidi/RemoteValue.sys.mjs (RemoteValue.sys.mjs)
|
||||
content/webdriver-bidi/WebDriverBiDi.sys.mjs (WebDriverBiDi.sys.mjs)
|
||||
content/webdriver-bidi/WebDriverBiDiConnection.sys.mjs (WebDriverBiDiConnection.sys.mjs)
|
||||
|
||||
# WebDriver BiDi modules
|
||||
content/webdriver-bidi/modules/ModuleRegistry.jsm (modules/ModuleRegistry.jsm)
|
||||
content/webdriver-bidi/modules/ModuleRegistry.sys.mjs (modules/ModuleRegistry.sys.mjs)
|
||||
|
||||
# WebDriver BiDi root modules
|
||||
content/webdriver-bidi/modules/root/browsingContext.jsm (modules/root/browsingContext.jsm)
|
||||
content/webdriver-bidi/modules/root/log.jsm (modules/root/log.jsm)
|
||||
content/webdriver-bidi/modules/root/script.jsm (modules/root/script.jsm)
|
||||
content/webdriver-bidi/modules/root/session.jsm (modules/root/session.jsm)
|
||||
content/webdriver-bidi/modules/root/browsingContext.sys.mjs (modules/root/browsingContext.sys.mjs)
|
||||
content/webdriver-bidi/modules/root/log.sys.mjs (modules/root/log.sys.mjs)
|
||||
content/webdriver-bidi/modules/root/script.sys.mjs (modules/root/script.sys.mjs)
|
||||
content/webdriver-bidi/modules/root/session.sys.mjs (modules/root/session.sys.mjs)
|
||||
|
||||
# WebDriver BiDi windowglobal modules
|
||||
content/webdriver-bidi/modules/windowglobal/browsingContext.jsm (modules/windowglobal/browsingContext.jsm)
|
||||
content/webdriver-bidi/modules/windowglobal/log.jsm (modules/windowglobal/log.jsm)
|
||||
content/webdriver-bidi/modules/windowglobal/script.jsm (modules/windowglobal/script.jsm)
|
||||
content/webdriver-bidi/modules/windowglobal/browsingContext.sys.mjs (modules/windowglobal/browsingContext.sys.mjs)
|
||||
content/webdriver-bidi/modules/windowglobal/log.sys.mjs (modules/windowglobal/log.sys.mjs)
|
||||
content/webdriver-bidi/modules/windowglobal/script.sys.mjs (modules/windowglobal/script.sys.mjs)
|
||||
|
||||
# WebDriver BiDi windowglobal-in-root modules
|
||||
content/webdriver-bidi/modules/windowglobal-in-root/browsingContext.jsm (modules/windowglobal-in-root/browsingContext.jsm)
|
||||
content/webdriver-bidi/modules/windowglobal-in-root/log.jsm (modules/windowglobal-in-root/log.jsm)
|
||||
content/webdriver-bidi/modules/windowglobal-in-root/browsingContext.sys.mjs (modules/windowglobal-in-root/browsingContext.sys.mjs)
|
||||
content/webdriver-bidi/modules/windowglobal-in-root/log.sys.mjs (modules/windowglobal-in-root/log.sys.mjs)
|
||||
|
|
|
|||
|
|
@ -2,41 +2,38 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["getModuleClass"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const modules = {
|
||||
root: {},
|
||||
"windowglobal-in-root": {},
|
||||
windowglobal: {},
|
||||
};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(modules.root, {
|
||||
// eslint-disable-next-line mozilla/lazy-getter-object-name
|
||||
ChromeUtils.defineESModuleGetters(modules.root, {
|
||||
browsingContext:
|
||||
"chrome://remote/content/webdriver-bidi/modules/root/browsingContext.jsm",
|
||||
log: "chrome://remote/content/webdriver-bidi/modules/root/log.jsm",
|
||||
script: "chrome://remote/content/webdriver-bidi/modules/root/script.jsm",
|
||||
session: "chrome://remote/content/webdriver-bidi/modules/root/session.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/root/browsingContext.sys.mjs",
|
||||
log: "chrome://remote/content/webdriver-bidi/modules/root/log.sys.mjs",
|
||||
script: "chrome://remote/content/webdriver-bidi/modules/root/script.sys.mjs",
|
||||
session:
|
||||
"chrome://remote/content/webdriver-bidi/modules/root/session.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(modules["windowglobal-in-root"], {
|
||||
// eslint-disable-next-line mozilla/lazy-getter-object-name
|
||||
ChromeUtils.defineESModuleGetters(modules["windowglobal-in-root"], {
|
||||
browsingContext:
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/browsingContext.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/browsingContext.sys.mjs",
|
||||
log:
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/log.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/log.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(modules.windowglobal, {
|
||||
// eslint-disable-next-line mozilla/lazy-getter-object-name
|
||||
ChromeUtils.defineESModuleGetters(modules.windowglobal, {
|
||||
browsingContext:
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/browsingContext.jsm",
|
||||
log: "chrome://remote/content/webdriver-bidi/modules/windowglobal/log.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/browsingContext.sys.mjs",
|
||||
log:
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/log.sys.mjs",
|
||||
script:
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/script.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/script.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -53,7 +50,7 @@ XPCOMUtils.defineLazyModuleGetters(modules.windowglobal, {
|
|||
* @throws {Error}
|
||||
* If the provided module folder is unexpected.
|
||||
**/
|
||||
const getModuleClass = function(moduleName, moduleFolder) {
|
||||
export const getModuleClass = function(moduleName, moduleFolder) {
|
||||
if (!modules[moduleFolder]) {
|
||||
throw new Error(
|
||||
`Invalid module folder "${moduleFolder}", expected one of "${Object.keys(
|
||||
|
|
@ -2,17 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["browsingContext"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -569,4 +561,4 @@ class BrowsingContextModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const browsingContext = BrowsingContextModule;
|
||||
export const browsingContext = BrowsingContextModule;
|
||||
|
|
@ -2,13 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["log"];
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
class LogModule extends Module {
|
||||
destroy() {}
|
||||
|
|
@ -18,4 +12,4 @@ class LogModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const log = LogModule;
|
||||
export const log = LogModule;
|
||||
|
|
@ -2,17 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["script"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -21,16 +11,13 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
ContextDescriptorType:
|
||||
"chrome://remote/content/shared/messagehandler/MessageHandler.sys.mjs",
|
||||
error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
|
||||
OwnershipModel: "chrome://remote/content/webdriver-bidi/RemoteValue.sys.mjs",
|
||||
RealmType: "chrome://remote/content/webdriver-bidi/Realm.sys.mjs",
|
||||
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
||||
WindowGlobalMessageHandler:
|
||||
"chrome://remote/content/shared/messagehandler/WindowGlobalMessageHandler.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
OwnershipModel: "chrome://remote/content/webdriver-bidi/RemoteValue.jsm",
|
||||
RealmType: "chrome://remote/content/webdriver-bidi/Realm.jsm",
|
||||
});
|
||||
|
||||
class ScriptModule extends Module {
|
||||
destroy() {}
|
||||
|
||||
|
|
@ -522,4 +509,4 @@ class ScriptModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const script = ScriptModule;
|
||||
export const script = ScriptModule;
|
||||
|
|
@ -2,13 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["session"];
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -224,4 +218,4 @@ class SessionModule extends Module {
|
|||
}
|
||||
|
||||
// To export the class as lower-case
|
||||
const session = SessionModule;
|
||||
export const session = SessionModule;
|
||||
|
|
@ -2,13 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["browsingContext"];
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -31,4 +25,4 @@ class BrowsingContextModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const browsingContext = BrowsingContextModule;
|
||||
export const browsingContext = BrowsingContextModule;
|
||||
|
|
@ -2,13 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["log"];
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -31,4 +25,4 @@ class LogModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const log = LogModule;
|
||||
export const log = LogModule;
|
||||
|
|
@ -2,13 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["browsingContext"];
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -115,4 +109,4 @@ class BrowsingContextModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const browsingContext = BrowsingContextModule;
|
||||
export const browsingContext = BrowsingContextModule;
|
||||
|
|
@ -2,17 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["log"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
@ -22,11 +12,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
ConsoleListener:
|
||||
"chrome://remote/content/shared/listeners/ConsoleListener.sys.mjs",
|
||||
isChromeFrame: "chrome://remote/content/shared/Stack.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
OwnershipModel: "chrome://remote/content/webdriver-bidi/RemoteValue.jsm",
|
||||
serialize: "chrome://remote/content/webdriver-bidi/RemoteValue.jsm",
|
||||
OwnershipModel: "chrome://remote/content/webdriver-bidi/RemoteValue.sys.mjs",
|
||||
serialize: "chrome://remote/content/webdriver-bidi/RemoteValue.sys.mjs",
|
||||
});
|
||||
|
||||
class LogModule extends Module {
|
||||
|
|
@ -235,4 +222,4 @@ class LogModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const log = LogModule;
|
||||
export const log = LogModule;
|
||||
|
|
@ -2,31 +2,18 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["script"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { Module } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/shared/messagehandler/Module.sys.mjs"
|
||||
);
|
||||
import { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
deserialize: "chrome://remote/content/webdriver-bidi/RemoteValue.sys.mjs",
|
||||
error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
|
||||
getFramesFromStack: "chrome://remote/content/shared/Stack.sys.mjs",
|
||||
isChromeFrame: "chrome://remote/content/shared/Stack.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
deserialize: "chrome://remote/content/webdriver-bidi/RemoteValue.jsm",
|
||||
serialize: "chrome://remote/content/webdriver-bidi/RemoteValue.jsm",
|
||||
stringify: "chrome://remote/content/webdriver-bidi/RemoteValue.jsm",
|
||||
WindowRealm: "chrome://remote/content/webdriver-bidi/Realm.jsm",
|
||||
serialize: "chrome://remote/content/webdriver-bidi/RemoteValue.sys.mjs",
|
||||
stringify: "chrome://remote/content/webdriver-bidi/RemoteValue.sys.mjs",
|
||||
WindowRealm: "chrome://remote/content/webdriver-bidi/Realm.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -354,4 +341,4 @@ class ScriptModule extends Module {
|
|||
}
|
||||
}
|
||||
|
||||
const script = ScriptModule;
|
||||
export const script = ScriptModule;
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { Realm } = ChromeUtils.import(
|
||||
"chrome://remote/content/webdriver-bidi/Realm.jsm"
|
||||
const { Realm } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/webdriver-bidi/Realm.sys.mjs"
|
||||
);
|
||||
|
||||
add_test(function test_id() {
|
||||
|
|
|
|||
|
|
@ -314,12 +314,12 @@ const REMOTE_COMPLEX_VALUES = [
|
|||
},
|
||||
];
|
||||
|
||||
const { Realm } = ChromeUtils.import(
|
||||
"chrome://remote/content/webdriver-bidi/Realm.jsm"
|
||||
const { Realm } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/webdriver-bidi/Realm.sys.mjs"
|
||||
);
|
||||
|
||||
const { deserialize, serialize, stringify } = ChromeUtils.import(
|
||||
"chrome://remote/content/webdriver-bidi/RemoteValue.jsm"
|
||||
const { deserialize, serialize, stringify } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/webdriver-bidi/RemoteValue.sys.mjs"
|
||||
);
|
||||
|
||||
add_test(function test_deserializePrimitiveTypes() {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { splitMethod } = ChromeUtils.import(
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.jsm"
|
||||
const { splitMethod } = ChromeUtils.importESModule(
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.sys.mjs"
|
||||
);
|
||||
|
||||
add_test(function test_Connection_splitMethod() {
|
||||
|
|
|
|||
|
|
@ -123,32 +123,6 @@
|
|||
"remote/cdp/targets/Target.jsm",
|
||||
"chrome://remote/content/cdp/targets/TargetList.jsm":
|
||||
"remote/cdp/targets/TargetList.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/NewSessionHandler.jsm":
|
||||
"remote/webdriver-bidi/NewSessionHandler.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/RemoteValue.jsm":
|
||||
"remote/webdriver-bidi/RemoteValue.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDi.jsm":
|
||||
"remote/webdriver-bidi/WebDriverBiDi.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/WebDriverBiDiConnection.jsm":
|
||||
"remote/webdriver-bidi/WebDriverBiDiConnection.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/ModuleRegistry.jsm":
|
||||
"remote/webdriver-bidi/modules/ModuleRegistry.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/root/browsingContext.jsm":
|
||||
"remote/webdriver-bidi/modules/root/browsingContext.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/root/log.jsm":
|
||||
"remote/webdriver-bidi/modules/root/log.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/root/script.jsm":
|
||||
"remote/webdriver-bidi/modules/root/script.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/root/session.jsm":
|
||||
"remote/webdriver-bidi/modules/root/session.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/log.jsm":
|
||||
"remote/webdriver-bidi/modules/windowglobal-in-root/log.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/browsingContext.jsm":
|
||||
"remote/webdriver-bidi/modules/windowglobal/browsingContext.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/log.jsm":
|
||||
"remote/webdriver-bidi/modules/windowglobal/log.jsm",
|
||||
"chrome://remote/content/webdriver-bidi/modules/windowglobal/script.jsm":
|
||||
"remote/webdriver-bidi/modules/windowglobal/script.jsm",
|
||||
"resource:///actors/ASRouterChild.jsm":
|
||||
"browser/components/newtab/actors/ASRouterChild.jsm",
|
||||
"resource:///actors/ASRouterParent.jsm":
|
||||
|
|
|
|||
Loading…
Reference in a new issue