Closed Bug 1674329 Opened 3 years ago Closed 3 years ago

Detect replacement of browsing context for cross-group navigations

Categories

(Remote Protocol :: Marionette, task, P1)

Default
task

Tracking

(Fission Milestone:M7, firefox85 fixed)

RESOLVED FIXED
85 Branch
Fission Milestone M7
Tracking Status
firefox85 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [marionette-fission-mvp])

Attachments

(1 file)

Right now we detect remoteness changes when the framescript (listener.js) gets attached:

https://searchfox.org/mozilla-central/rev/d866b96d74ec2a63f09ee418f048d23f4fd379a2/testing/marionette/listener.js#1088-1090

https://searchfox.org/mozilla-central/rev/d866b96d74ec2a63f09ee418f048d23f4fd379a2/testing/marionette/driver.js#3646-3664

But once we no longer have the framescript registered, we need a new method in figuring out when the current browsing context gets swapped.

Summary: Move detection of remoteness (browsing context) change out of the framescript code → Use actor based approach to detect remoteness (browsing context) change

As given by Olli swapping browsing contexts should actually only happen for top-level browsing contexts. So we could use browsingContext.browserId to check if the newly created browsing context is related to the currently selected tab.

Tracking marionette-fission-mvp bugs for Fission Beta milestone (M7).

Fission Milestone: --- → M7
Priority: P3 → P2

Here actually some details about which objects are placed by a navigation:
https://firefox-source-docs.mozilla.org/dom/navigation/nav_replace.html

So cross-group navigations can actually trigger a replacement of the browsing context .

Summary: Use actor based approach to detect remoteness (browsing context) change → Detect replacement of browsing context for cross-group navigations

Also important to note here is that a navigation can be triggered at any time by any command or the website itself. As such this detection should run globally and be active all the time, and not only during a navigation command.

Depends on: 1676709

I filed bug 1676709 to get a browsing-context-attached notification added, which can be used to check if the browsing context was replaced by comparing the browserId.

Blocks: 1675173
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P2 → P1
Depends on: 1678455
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4a6a7555c8a5
[marionette] Detect replacement of browsing context for cross-group navigations. r=marionette-reviewers,maja_zf
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Blocks: 1680479
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.