Bug 1691446 - [remote] Rename webdriverBiDi to webDriverBiDi. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D120014
This commit is contained in:
Henrik Skupin 2021-07-16 11:56:49 +00:00
Родитель 908b1cbd5b
Коммит 1fdbe9da54
3 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -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();

Просмотреть файл

@ -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;

Просмотреть файл

@ -65,7 +65,7 @@ class TestCommandLineArguments(MarionetteTestCase):
const { RemoteAgent } = ChromeUtils.import(
"chrome://remote/content/components/RemoteAgent.jsm"
);
return !!RemoteAgent.webdriverBiDi;
return !!RemoteAgent.webDriverBiDi;
"""
)