Skip to content

Commit

Permalink
Bug 1691446 - [remote] Rename webdriverBiDi to webDriverBiDi. r=webdr…
Browse files Browse the repository at this point in the history
…iver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D120014
  • Loading branch information
whimboo committed Jul 16, 2021
1 parent 908b1cb commit 1fdbe9d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions remote/components/RemoteAgent.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand All @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions remote/marionette/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_websocket_url(self):
const { RemoteAgent } = ChromeUtils.import(
"chrome://remote/content/components/RemoteAgent.jsm"
);
return !!RemoteAgent.webdriverBiDi;
return !!RemoteAgent.webDriverBiDi;
"""
)

Expand Down

0 comments on commit 1fdbe9d

Please sign in to comment.