[wdspec] bidi/browsing_context/reload/frame.py is not awaiting last assert
Categories
(Remote Protocol :: WebDriver BiDi, defect, P3)
Tracking
(firefox152 fixed)
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webdriver:m20], [wptsync upstream])
Attachments
(1 file)
This test is incorrect https://searchfox.org/firefox-main/rev/9a3317a65545e83f4e32b94fdf1f6860342423ef/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/reload/frame.py#10-11,29-31
@pytest.mark.parametrize("domain", ["", "alt"], ids=["same_origin", "cross_origin"])
async def test_origin(bidi_session, new_tab, inline, domain):
...
# Reload and assert (frame).
reload_and_assert(bidi_session, frame, last_navigation=result["navigation"], url=frame_url)
In theory we should await reload_and_assert, but the issue is that this helper doesn't work as is with iframes, because it assumes the context (here frame) should survive the reload, which is not true for iframes.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Let's just update the test to await and adjust the manifest accordingly.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
| Assignee | ||
Comment 3•1 month ago
|
||
With this change, both Chrome and Firefox fail the test.
Chrome fails with:
FAIL test_origin[same_origin] - webdriver.bidi.error.UnknownErrorException: unknown error (navigation canceled by context disposal)
FAIL test_origin[cross_origin] - webdriver.bidi.error.UnknownErrorException: unknown error (Command can only be executed on top-level targets)
(this second error is odd as it seems to indicate Chrome rejects reload commands for non top-level contexts, which is not spec compliant)
Firefox fails with
FAIL test_origin[same_origin] - webdriver.bidi.error.UnknownErrorException: unknown error (Error: Browsing context got discarded)
FAIL test_origin[cross_origin] - webdriver.bidi.error.UnknownErrorException: unknown error (Error: Browsing context got discarded)
As described on Bug 2030909, this specific error seems related to the fact that we use the sessionHistory reload now. However switching back to context reload navigates to about:blank (so no error in the command itself, but fails the assert).
| Assignee | ||
Comment 4•1 month ago
|
||
From what I mentioned in our triage meeting, we get a pytest warning about a non awaited coroutine:
RuntimeWarning: coroutine 'coroutine_name' was never awaited
Maybe we could make the tests fail on this warning?
On the linting side, Ruff implements something which seems relevant but I haven't tried it out https://github.com/astral-sh/ruff/pull/9911/
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/59353 for changes under testing/web-platform/tests
Comment 7•1 month ago
|
||
| bugherder | ||
Upstream PR merged by moz-wptsync-bot
Updated•1 month ago
|
Description
•