Fix browser_alltabslistener.js to work in fission
Categories
(Firefox :: Tabbed Browser, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: Gijs, Assigned: Gijs)
References
(Blocks 1 open bug)
Details
Attachments
(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:
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);
Promise.all(promises).then(startTest1);
}
function startTest1() {
info("\nTest 1");
gBrowser.addProgressListener(gFrontProgressListener);
gBrowser.addTabsProgressListener(gAllProgressListener);
...
}
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...
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D48851
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D48852
Assignee | ||
Comment 4•5 years ago
|
||
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d4837cfe8ba0
https://hg.mozilla.org/mozilla-central/rev/a90b5a945993
https://hg.mozilla.org/mozilla-central/rev/c51f3b5c78ad
Comment 7•5 years ago
|
||
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:
0ee3c76a-bc79-4eb2-8d12-05dc0b68e732
Description
•