зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1691446
- [remote] Rename webdriverBiDi to webDriverBiDi. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D120014
This commit is contained in:
Родитель
908b1cbd5b
Коммит
1fdbe9da54
|
@ -43,10 +43,10 @@ class RemoteAgentClass {
|
||||||
this.server = null;
|
this.server = null;
|
||||||
|
|
||||||
if ((activeProtocols & WEBDRIVER_BIDI_ACTIVE) === WEBDRIVER_BIDI_ACTIVE) {
|
if ((activeProtocols & WEBDRIVER_BIDI_ACTIVE) === WEBDRIVER_BIDI_ACTIVE) {
|
||||||
this.webdriverBiDi = new WebDriverBiDi(this);
|
this.webDriverBiDi = new WebDriverBiDi(this);
|
||||||
logger.debug("WebDriver BiDi enabled");
|
logger.debug("WebDriver BiDi enabled");
|
||||||
} else {
|
} else {
|
||||||
this.webdriverBiDi = null;
|
this.webDriverBiDi = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((activeProtocols & CDP_ACTIVE) === CDP_ACTIVE) {
|
if ((activeProtocols & CDP_ACTIVE) === CDP_ACTIVE) {
|
||||||
|
@ -124,7 +124,7 @@ class RemoteAgentClass {
|
||||||
this.server._start(port, host);
|
this.server._start(port, host);
|
||||||
|
|
||||||
await this.cdp?.start();
|
await this.cdp?.start();
|
||||||
await this.webdriverBiDi?.start();
|
await this.webDriverBiDi?.start();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await this.close();
|
await this.close();
|
||||||
logger.error(`Unable to start remote agent: ${e.message}`, e);
|
logger.error(`Unable to start remote agent: ${e.message}`, e);
|
||||||
|
@ -136,7 +136,7 @@ class RemoteAgentClass {
|
||||||
// Stop the CDP support before stopping the server.
|
// Stop the CDP support before stopping the server.
|
||||||
// Otherwise the HTTP server will fail to stop.
|
// Otherwise the HTTP server will fail to stop.
|
||||||
this.cdp?.stop();
|
this.cdp?.stop();
|
||||||
this.webdriverBiDi?.stop();
|
this.webDriverBiDi?.stop();
|
||||||
|
|
||||||
if (this.listening) {
|
if (this.listening) {
|
||||||
return this.server.stop();
|
return this.server.stop();
|
||||||
|
|
|
@ -147,8 +147,8 @@ Object.defineProperty(GeckoDriver.prototype, "context", {
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(GeckoDriver.prototype, "currentSession", {
|
Object.defineProperty(GeckoDriver.prototype, "currentSession", {
|
||||||
get() {
|
get() {
|
||||||
if (RemoteAgent.webdriverBiDi) {
|
if (RemoteAgent.webDriverBiDi) {
|
||||||
return RemoteAgent.webdriverBiDi.session;
|
return RemoteAgent.webDriverBiDi.session;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._currentSession;
|
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
|
// to handle the WebDriver session. If it's not the case then Marionette
|
||||||
// itself needs to handle it, and has to nullify the "webSocketUrl"
|
// itself needs to handle it, and has to nullify the "webSocketUrl"
|
||||||
// capability.
|
// capability.
|
||||||
if (RemoteAgent.webdriverBiDi) {
|
if (RemoteAgent.webDriverBiDi) {
|
||||||
RemoteAgent.webdriverBiDi.createSession(capabilities);
|
RemoteAgent.webDriverBiDi.createSession(capabilities);
|
||||||
} else {
|
} else {
|
||||||
this._currentSession = new WebDriverSession(capabilities);
|
this._currentSession = new WebDriverSession(capabilities);
|
||||||
this._currentSession.capabilities.delete("webSocketUrl");
|
this._currentSession.capabilities.delete("webSocketUrl");
|
||||||
|
@ -2142,8 +2142,8 @@ GeckoDriver.prototype.deleteSession = function() {
|
||||||
unregisterCommandsActor();
|
unregisterCommandsActor();
|
||||||
unregisterEventsActor();
|
unregisterEventsActor();
|
||||||
|
|
||||||
if (RemoteAgent.webdriverBiDi) {
|
if (RemoteAgent.webDriverBiDi) {
|
||||||
RemoteAgent.webdriverBiDi.deleteSession();
|
RemoteAgent.webDriverBiDi.deleteSession();
|
||||||
} else {
|
} else {
|
||||||
this.currentSession.destroy();
|
this.currentSession.destroy();
|
||||||
this._currentSession = null;
|
this._currentSession = null;
|
||||||
|
|
|
@ -65,7 +65,7 @@ class TestCommandLineArguments(MarionetteTestCase):
|
||||||
const { RemoteAgent } = ChromeUtils.import(
|
const { RemoteAgent } = ChromeUtils.import(
|
||||||
"chrome://remote/content/components/RemoteAgent.jsm"
|
"chrome://remote/content/components/RemoteAgent.jsm"
|
||||||
);
|
);
|
||||||
return !!RemoteAgent.webdriverBiDi;
|
return !!RemoteAgent.webDriverBiDi;
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче