Closed Bug 1763134 Opened 3 years ago Closed 2 months ago

Handle navigation which trigger beforeunload prompts for browsingContext.navigate

Categories

(Remote Protocol :: WebDriver BiDi, task, P2)

task
Points:
3

Tracking

(firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: jdescottes, Assigned: Sasha)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:m12], [wptsync upstream])

Attachments

(2 files)

Follow up to handle more specific navigation use cases.
We should support navigation which trigger a beforeunload prompt

Whiteboard: [webdriver:backlog]

For now this is blocked on the ability to handle user prompts. This feature will be added as part of bug 1768170.

Depends on: 1768170
Priority: -- → P3
No longer depends on: 1768170

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.

Flags: needinfo?(jdescottes)

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.

Flags: needinfo?(jdescottes)

In the scope of this bug, we should cover two cases:

  • if the navigate command was started with wait argument equal none when beforeunload prompt is open, we should return from the navigate command;
  • if the beforeunload prompt was dismissed, we should fail navigate command with unknown error.
Whiteboard: [webdriver:backlog] → [webdriver:triage]
Points: --- → 3
Depends on: 1846601
Priority: P3 → P2
Whiteboard: [webdriver:triage] → [webdriver:m12]
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Blocks: 1905641

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.

No longer blocks: 1905641
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/619dddf77a31 Stop navigation with "wait" equal "none" when beforeunload prompt is open. r=webdriver-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/d3ff8ea02d53 [wdspec] Add test for navigation with "wait" equal "none" and beforeunload prompt open. r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47463 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m12] → [webdriver:m12], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: