Closed Bug 1587784 Opened 1 year ago Closed 1 year ago

Fix browser_alltabslistener.js to work in fission


(Firefox :: Tabbed Browser, task)

Not set



Firefox 71
Fission Milestone M4
Tracking Status
firefox71 --- fixed


(Reporter: Gijs, Assigned: Gijs)


(Blocks 1 open bug)



(3 files)

This test is marked fail-if = fission, and lots (if not to say most) of the assertions fail when switching to fission.

A big reason this happens is that early on, the test gets confused and it never recovers. This is because of this code:,236-237

function test() {
  // We must wait until a page has completed loading before
  // starting tests or we get notifications from that
  let promises = [
    BrowserTestUtils.browserStopped(gBackgroundBrowser, kBasePage),
    BrowserTestUtils.browserStopped(gForegroundBrowser, kBasePage),
  BrowserTestUtils.loadURI(gBackgroundBrowser, kBasePage);
  BrowserTestUtils.loadURI(gForegroundBrowser, kBasePage);

function startTest1() {
  info("\nTest 1");

With fission, the load of kBasePage triggers a process swap. The process swap means webprogress listeners get detached from the old torn-down browser/docshell/webprogress instances, and attached to the new one. Unfortunately, this happens at different times for the listener from tabbrowser itself, and the listener in the test. This means that the test's listener (ie the one from browserStopped) gets notified before the tabbrowser listener. In non-fission, there's no process swap and so the test listener gets notified afterwards.

The upshot of this is that in fission, the test's listeners get told of the state_stop state change that finishes loadding kBasePage, which because it is the last one means that the test concludes this is the only notification it's going to get for the page it's loaded, and it correctly fails because of this.

However, even when fixing this by waiting for the event to be fully processed before adding the test handlers, further loads in the test also confuse the test. I'm still working on those bits...

Pushed by
improve logging and test assertions in browser_alltabslistener.js so it's easier to work out what's going on, r=dao
avoid the test listener in browser_alltabslistener.js being notified for the base/dummy page loading when fission is enabled, r=dao
expect the additional onSecurityChange update that comes with a remoteness change in fission in browser_alltabslistener.js, r=dao

Retroactively moving fixed bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to an appropriate Fission Milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:


Fission Milestone: --- → M4
You need to log in before you can comment on or make changes to this bug.