Nothing Special   »   [go: up one dir, main page]

Closed Bug 1861655 Opened 1 year ago Closed 1 year ago

Wrong navigation id for browsingContext.navigate with wait=none

Categories

(Remote Protocol :: WebDriver BiDi, defect, P1)

defect
Points:
3

Tracking

(firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webdriver:m9][wptsync upstream][webdriver:relnote])

Attachments

(2 files)

browsingContext.navigate expects to read the navigation id for the browsingContext just before resolving, but in case of a wait=none navigation, we might not have had time for the content process listener to reach the parent process.

In those cases the navigation id returned from browsingContext.navigate will be the previous one stored for this navigation.

We should create the id directly in browsingContext.navigate since we know we should expect a navigation, and also this is in-line with the BiDi spec for await a navigation which says that the navigation UUID should be created here and used by HTML's navigate.

We can basically do the same as what the network module does for beforeRequestSent: https://searchfox.org/mozilla-central/rev/c51359e1e6beeb6cee5eafe67272c9be16fcf5c1/remote/webdriver-bidi/modules/root/network.sys.mjs#472-480

Looking at Bug 1769514, we need to be careful not to simply trigger a navigation-started whenever browsingContext.navigate is called.
navigate could very well just result in a fragment navigation, and in that case even if we want a navigation id, we don't want navigation-started / stopped.

Which means we should only create/prepare the id, but not force the creation of events. Whereas it's safe to do from the network module, because a navigation request means we have a navigation-started event.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Duplicate of this bug: 1769514

I'll check if this is landable.

Flags: needinfo?(hskupin)
Points: --- → 3
Flags: needinfo?(hskupin)
Priority: -- → P1
Whiteboard: [webdriver:m9]
Flags: needinfo?(hskupin)

I've requested lando to land the revisions.

Flags: needinfo?(hskupin)
Severity: -- → S3
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4180e81f2e99 [bidi] Create navigation id in browsingContext.navigate r=webdriver-reviewers,Sasha https://hg.mozilla.org/integration/autoland/rev/e6241b851988 [wdspec] Add BiDi navigationStarted test for locationchange happening before load r=webdriver-reviewers,Sasha
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/43007 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m9] → [webdriver:m9], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1868282
Whiteboard: [webdriver:m9], [wptsync upstream] → [webdriver:m9][wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: