Open OrKoN opened 1 week ago
@sadym-chromium would you be able to take a look?
on it
It looks like this is what WebDriver BiDi specifies to do:
https://x.com
, so this is my speculation) x.com sets window.location
to https://twitter.com/x/migrate?tok=...
.We looked offline and we could not confirm that unload counter step is actually the reason. At least, we should add a specific error code for this situation so that the client knows to wait for subsequent navigation IDs to implement waiting.
Spec:
browsingContext.navigate
browsingContext.navigationAborted
event).Spec:
* [`browsingContext.navigate`](https://w3c.github.io/webdriver-bidi/#command-browsingContext-navigate) * [Aawait a navigation](https://w3c.github.io/webdriver-bidi/#await-a-navigation): * [Navigate](https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate) navigable... * [navigate](https://html.spec.whatwg.org/#navigate), step 22.3: [abort a document and its descendants](https://html.spec.whatwg.org/#abort-a-document-and-its-descendants) given navigable's [active document](https://html.spec.whatwg.org/#nav-document). * [Abort a document and its descendants](https://html.spec.whatwg.org/#abort-a-document-and-its-descendants): * [Abort a document](https://html.spec.whatwg.org/#abort-a-document) * If document's [during-loading navigation ID for WebDriver BiDi](https://html.spec.whatwg.org/#concept-document-navigation-id) is non-null, then: * Invoke [WebDriver BiDi navigation aborted](https://w3c.github.io/webdriver-bidi/#webdriver-bidi-navigation-aborted) (emits `browsingContext.navigationAborted` event). * This case does not fall under **_"If event received is "navigation failed" return [error](https://w3c.github.io/webdriver/#dfn-errors) with [error code](https://w3c.github.io/webdriver/#dfn-error-code) [unknown error](https://w3c.github.io/webdriver/#dfn-unknown-error)"_** * The command should **_"Return [success](https://w3c.github.io/webdriver/#dfn-success) with data body."_**
Thanks for checking this! So as it looks like we should not fail the navigation for abort scenarios? I assume the current tests at https://github.com/web-platform-tests/wpt/pull/48751 need to be updated to reflect this?
Spec:
* [`browsingContext.navigate`](https://w3c.github.io/webdriver-bidi/#command-browsingContext-navigate) * [Aawait a navigation](https://w3c.github.io/webdriver-bidi/#await-a-navigation): * [Navigate](https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate) navigable... * [navigate](https://html.spec.whatwg.org/#navigate), step 22.3: [abort a document and its descendants](https://html.spec.whatwg.org/#abort-a-document-and-its-descendants) given navigable's [active document](https://html.spec.whatwg.org/#nav-document). * [Abort a document and its descendants](https://html.spec.whatwg.org/#abort-a-document-and-its-descendants): * [Abort a document](https://html.spec.whatwg.org/#abort-a-document) * If document's [during-loading navigation ID for WebDriver BiDi](https://html.spec.whatwg.org/#concept-document-navigation-id) is non-null, then: * Invoke [WebDriver BiDi navigation aborted](https://w3c.github.io/webdriver-bidi/#webdriver-bidi-navigation-aborted) (emits `browsingContext.navigationAborted` event). * This case does not fall under **_"If event received is "navigation failed" return [error](https://w3c.github.io/webdriver/#dfn-errors) with [error code](https://w3c.github.io/webdriver/#dfn-error-code) [unknown error](https://w3c.github.io/webdriver/#dfn-unknown-error)"_** * The command should **_"Return [success](https://w3c.github.io/webdriver/#dfn-success) with data body."_**
Thanks for checking this! So as it looks like we should not fail the navigation for abort scenarios? I assume the current tests at web-platform-tests/wpt#48751 need to be updated to reflect this?
I suspect it is not the intention not to fail here so perhaps we need to discuss what's expected in this situation.
Results in
Originally reported in https://github.com/puppeteer/puppeteer/issues/12929