Bug 1766802 - [remote] Delay startup of WebDriver BiDi until all initial application windows have been restored. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D144963
This commit is contained in:
Henrik Skupin 2022-04-28 16:38:25 +00:00
parent 4fc2732530
commit 12f8ed22e1
4 changed files with 26 additions and 5 deletions

View File

@ -75,11 +75,14 @@ class CDP {
return;
}
// Starting CDP too early can cause issues with clients like Puppeteer.
// Especially when closing the browser while it's still starting up, which
// can cause shutdown hangs. As such CDP will be started when all the
// browser windows are restored (workaround for bug 1764420).
logger.debug(`Delay start-up until all windows have been restored`);
// Starting CDP too early can cause issues with clients in not being able
// to find any available target. Also when closing the application while
// it's still starting up can cause shutdown hangs. As such CDP will be
// started when all the initial application windows have been fully
// restored (workaround for bug 1764420).
logger.debug(
`Awaiting all initial windows to be restored before enabling the protocol`
);
await this.agent.browserStartupFinished;
// Note: Ideally this would only be set at the end of the method. However

View File

@ -166,6 +166,16 @@ class WebDriverBiDi {
return;
}
// Starting WebDriver BiDi too early can cause issues with clients in not
// being able to find any available browsing context. Also when closing
// the application while it's still starting up can cause shutdown hangs.
// As such WebDriver BiDi will be started when all the initial application
// windows have been fully restored (workaround for bug 1764420).
logger.debug(
`Awaiting all initial windows to be restored before enabling the protocol`
);
await this.agent.browserStartupFinished;
this._running = true;
// Install a HTTP handler for direct WebDriver BiDi connection requests.

View File

@ -2,7 +2,11 @@
[test_allow_hosts_passed_to_remote_agent[allowed\]]
disabled:
if release_or_beta: https://bugzilla.mozilla.org/show_bug.cgi?id=1712902
expected:
if os == "android": FAIL # Bug 1766314
[test_allow_hosts_passed_to_remote_agent[not allowed\]]
disabled:
if release_or_beta: https://bugzilla.mozilla.org/show_bug.cgi?id=1712902
expected:
if os == "android": FAIL # Bug 1766314

View File

@ -2,7 +2,11 @@
[test_allow_origins_passed_to_remote_agent[allowed\]]
disabled:
if release_or_beta: https://bugzilla.mozilla.org/show_bug.cgi?id=1712902
expected:
if os == "android": FAIL # Bug 1766314
[test_allow_origins_passed_to_remote_agent[not allowed\]]
disabled:
if release_or_beta: https://bugzilla.mozilla.org/show_bug.cgi?id=1712902
expected:
if os == "android": FAIL # Bug 1766314