Bug 295084
| Summary: | [WebDriver][BiDi] Fix browsingContext.close error reported when the window is already closed | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebDriver | Assignee: | Lauro Moura <lmoura> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bburg, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Lauro Moura
imported/w3c/webdriver/tests/bidi/browsing_context/context_destroyed/context_destroyed.py::test_unsubscribe
The test itself works fine, but its fixture `new_tab` expects `NoSuchFrame` to be returned when the newly created tab was closed. This aligns with the "get a navigable" behavior, which is:
https://w3c.github.io/webdriver-bidi/#get-a-navigable
> If there is no navigable with navigable id navigable id return error with error code no such frame
Our current `browsingContext.close` implementation uses `WebAutomationSession::closeBrowsingContext()`, which focus on the current top level browsing context as usual in WebDriver classic commands, returning a different error:
https://w3c.github.io/webdriver/#close-window
> If session's current top-level browsing context is no longer open, return error with error code no such window.
Patch incoming.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/47280
Radar WebKit Bug Importer
<rdar://problem/155012803>
EWS
Committed 297198@main (4c43756c1f6f): <https://commits.webkit.org/297198@main>
Reviewed commits have been landed. Closing PR #47280 and removing active labels.