`browsingContext.domContentLoaded` can have context set to null
Categories
(Remote Protocol :: WebDriver BiDi, defect, P2)
Tracking
(firefox119 fixed)
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: lightning00blade, Assigned: jdescottes)
References
Details
(Whiteboard: [webdriver:m8][webdriver:relnote])
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Steps to reproduce:
Run the following Puppeteer test in evaluation.spec.ts
should work with unicode chars
should throw when evaluation triggers reload
should await promise
Attached Puppeteer debugging logs + Firefox Traces.
Actual results:
Individually all pass as expected, but when run one after the other an event browsingContext.domContentLoaded
with context:null
sneaks in.
This is not per spec so our implementation fails
Most likely do the code in should throw when evaluation triggers reload
as it triggers a navigation and we close the page soon after.
Expected results:
The event should not be fired if its not related to any browsingContext
.
Also happens for this pair of Puppeteer tests in page.spec.ts
:
should respect timeout
should respect default navigation timeout
Assignee | ||
Comment 2•2 years ago
•
|
||
Thanks! I can easily reproduce by running commands inspired from the should throw when evaluation triggers reload
test:
- browsingContext.create
- browsingContext.navigate to "about:blank"
- script.callFunction with
location.reload
- browsingContext.close
And I agree that if we receive events for a browsing context which no longer exists, we should just discard them.
Comment 3•2 years ago
|
||
The severity field is not set for this bug.
:whimboo, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D187898
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D188101
If the browsing context is discarded, it will not have any embedderElement attached, and we cannot process it as expected.
Add the helper and use it for the existing spots checking for valid browsing contexts.
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D188102
Updated•2 years ago
|
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bccc4a0a8662
https://hg.mozilla.org/mozilla-central/rev/75072208d649
https://hg.mozilla.org/mozilla-central/rev/6706e17fe8c3
Updated•1 year ago
|
Assignee | ||
Updated•8 months ago
|
Description
•