diff --git a/remote/components/RemoteAgent.jsm b/remote/components/RemoteAgent.jsm index 8f0fd9a3add5..c213eb891e8f 100644 --- a/remote/components/RemoteAgent.jsm +++ b/remote/components/RemoteAgent.jsm @@ -43,10 +43,10 @@ class RemoteAgentClass { this.server = null; if ((activeProtocols & WEBDRIVER_BIDI_ACTIVE) === WEBDRIVER_BIDI_ACTIVE) { - this.webdriverBiDi = new WebDriverBiDi(this); + this.webDriverBiDi = new WebDriverBiDi(this); logger.debug("WebDriver BiDi enabled"); } else { - this.webdriverBiDi = null; + this.webDriverBiDi = null; } if ((activeProtocols & CDP_ACTIVE) === CDP_ACTIVE) { @@ -124,7 +124,7 @@ class RemoteAgentClass { this.server._start(port, host); await this.cdp?.start(); - await this.webdriverBiDi?.start(); + await this.webDriverBiDi?.start(); } catch (e) { await this.close(); logger.error(`Unable to start remote agent: ${e.message}`, e); @@ -136,7 +136,7 @@ class RemoteAgentClass { // Stop the CDP support before stopping the server. // Otherwise the HTTP server will fail to stop. this.cdp?.stop(); - this.webdriverBiDi?.stop(); + this.webDriverBiDi?.stop(); if (this.listening) { return this.server.stop(); diff --git a/remote/marionette/driver.js b/remote/marionette/driver.js index 25878d2f625e..1179ecf2a25a 100644 --- a/remote/marionette/driver.js +++ b/remote/marionette/driver.js @@ -147,8 +147,8 @@ Object.defineProperty(GeckoDriver.prototype, "context", { */ Object.defineProperty(GeckoDriver.prototype, "currentSession", { get() { - if (RemoteAgent.webdriverBiDi) { - return RemoteAgent.webdriverBiDi.session; + if (RemoteAgent.webDriverBiDi) { + return RemoteAgent.webDriverBiDi.session; } return this._currentSession; @@ -427,8 +427,8 @@ GeckoDriver.prototype.newSession = async function(cmd) { // to handle the WebDriver session. If it's not the case then Marionette // itself needs to handle it, and has to nullify the "webSocketUrl" // capability. - if (RemoteAgent.webdriverBiDi) { - RemoteAgent.webdriverBiDi.createSession(capabilities); + if (RemoteAgent.webDriverBiDi) { + RemoteAgent.webDriverBiDi.createSession(capabilities); } else { this._currentSession = new WebDriverSession(capabilities); this._currentSession.capabilities.delete("webSocketUrl"); @@ -2142,8 +2142,8 @@ GeckoDriver.prototype.deleteSession = function() { unregisterCommandsActor(); unregisterEventsActor(); - if (RemoteAgent.webdriverBiDi) { - RemoteAgent.webdriverBiDi.deleteSession(); + if (RemoteAgent.webDriverBiDi) { + RemoteAgent.webDriverBiDi.deleteSession(); } else { this.currentSession.destroy(); this._currentSession = null; diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_cli_arguments.py b/testing/marionette/harness/marionette_harness/tests/unit/test_cli_arguments.py index fa69297211f1..f14f46695a03 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_cli_arguments.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_cli_arguments.py @@ -65,7 +65,7 @@ class TestCommandLineArguments(MarionetteTestCase): const { RemoteAgent } = ChromeUtils.import( "chrome://remote/content/components/RemoteAgent.jsm" ); - return !!RemoteAgent.webdriverBiDi; + return !!RemoteAgent.webDriverBiDi; """ )