Closed Bug 1922014 Opened 5 months ago Closed 3 months ago

Don't emit "browsingContext.navigationStarted" event when creating new top-level browsing contexts (tabs) when "about:blank" is loaded

Categories

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

enhancement
Points:
3

Tracking

(firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: whimboo, Assigned: Sasha)

References

(Blocks 1 open bug, )

Details

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

Attachments

(3 files)

When executing the command browsingContext.create we currently send out navigation events like browsingContext.navigationStarted even for the initial about:blank. As discussed during TPAC (https://github.com/w3c/webdriver-bidi/issues/766) we should align to other browsers and as well follow the HTML specification which doesn't say that navigation events should be emitted.

This should also apply to evaluating a script that runs window.open() for about:blank.

But normal navigations to about:blank should not be affected.

@whimboo So webdriver bidi, I see the constructor for browsingContext emits the nnavigationStarted event, which is a private method. The browsingContext.Create doesn't emit the navigationStarted event itself. So what we are trying to do here is to remove this right?

Assignee: nobody → temidayoazeez032
Status: NEW → ASSIGNED
Whiteboard: [webdriver:m13] → [webdriver:external][webdriver:m13]

Per discussion on phabricator, resetting the bug

Assignee: temidayoazeez032 → nobody
Status: ASSIGNED → NEW
Whiteboard: [webdriver:external][webdriver:m13] → [webdriver:m13]
Assignee: nobody → temidayoazeez032
Status: NEW → ASSIGNED
Assignee: temidayoazeez032 → nobody
Status: ASSIGNED → NEW
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Blocks: 1930594

Keeping this bug just about skipping "browsingContext.navigationStarted" event and moving load events to a follow-up bug 1930594.

Summary: Don't emit navigation events when creating new top-level browsing contexts (tabs) when "about:blank" is loaded → Don't emit "browsingContext.navigationStarted" event when creating new top-level browsing contexts (tabs) when "about:blank" is loaded

Just to document the spec state:

In the browsing context creation algorithm there are no navigation steps, we are only supposed to set about:blank to certain context properties, this means that we don’t get to the step of sending browsingContext.navigationStarted event.
In case of window.open, in the window open steps algorithm we're supposed to create a top browsing context (so the behavior is similar to the case described above) and then navigate or update history to a desired URL, but as it says in the note in the step 6 we shouldn't do anything if the url fully matches about:blank. Which means that again we shouldn't emit browsingContext.navigationStarted event.
We should still send browsingContext.navigationStarted event when a client navigates to it outside a top-level context creation.

Points: 5 → 3
No longer blocks: 1756597, 1756617
Whiteboard: [webdriver:m13] → [webdriver:m14]
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/db7391afb2a2 [bidi] Don't emit "browsingContext.navigationStarted" event when creating a new top-level browsing contexts when "about:blank" is loaded. r=webdriver-reviewers,whimboo,jdescottes https://hg.mozilla.org/integration/autoland/rev/d5f3b0175c7f [wdspec] Add tests for "browsingContext.navigationStarted" event when a top-level browsing context get created. r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49220 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m14] → [webdriver:m14], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Upstream PR merged by moz-wptsync-bot
Whiteboard: [webdriver:m14], [wptsync upstream] → [webdriver:m14][wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: