Handle navigation which trigger beforeunload prompts for browsingContext.navigate
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(firefox131 fixed)
Tracking | Status | |
---|---|---|
firefox131 | --- | fixed |
People
(Reporter: jdescottes, Assigned: Sasha)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webdriver:m12][wptsync upstream][webdriver:relnote])
Attachments
(2 files)
Follow up to handle more specific navigation use cases.
We should support navigation which trigger a beforeunload prompt
For now this is blocked on the ability to handle user prompts. This feature will be added as part of bug 1768170.
Comment 2•4 months ago
|
||
Julian, do you remember which use cases you had in mind? We could at least check the disabled Puppeteer unit tests and try to get those running. AFAIR there are as well scenarios with history.pushState()
, redirects, and most likely others.
Reporter | ||
Comment 3•4 months ago
|
||
Sorry I don't really remember specific scenarios. I just remember we couldn't check beforeunload at all at that time because bidi did not support it.
I think at least checking that a navigation with a dismissed beforeunload prompt would be a good start. Ideally then also test what happens when the navigation is cancelled.
Regarding other scenarios, yes we can add history navigation and redirects.
Assignee | ||
Comment 4•2 months ago
|
||
In the scope of this bug, we should cover two cases:
- if the navigate command was started with
wait
argument equalnone
whenbeforeunload
prompt is open, we should return from thenavigate
command; - if the
beforeunload
prompt was dismissed, we should fail navigate command withunknown
error.
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 5•2 months ago
|
||
It looks like that implementation-wise, it's easier to keep this bug just about the case of returning from the navigation command when it is started with wait
argument equal none
and when beforeunload prompt is open and move the case of failing the command to bug 1905083.
Assignee | ||
Comment 6•2 months ago
|
||
Assignee | ||
Comment 7•2 months ago
|
||
Comment 10•2 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/619dddf77a31
https://hg.mozilla.org/mozilla-central/rev/d3ff8ea02d53
Description
•