Make browser/components/extensions/test/browser/browser_ext_tabs_readerMode.js work with Fission and BFCache
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
So what's going on is that these two lines of code: https://searchfox.org/mozilla-central/rev/202250ee5931648185c8abb3061d738b15b64067/docshell/base/nsDocShell.cpp#1224-1225 are causing two onStateChange
notifications, and the later one cause an extra tabUpdated
message here: https://searchfox.org/mozilla-central/rev/202250ee5931648185c8abb3061d738b15b64067/browser/components/extensions/test/browser/browser_ext_tabs_readerMode.js#68
When the document comes from the bfcache we get:
- onLocationChange() with isLoadingDocument = false
- onStateChange() with isLoadingDocument = true (from the first line)
- onStateChange() with isLoadingDocument = false (from the second one)
So the test sees the later one and triggers an extra tabUpdated
message, then proceeds while it thinks it has a different page loaded and it all goes downhill from there.
Olli, Is the order of notifications above expected? If so, I can just fix the test to wait for the right URL. If not, I can look into fixing that.
Assignee | ||
Comment 2•3 years ago
|
||
(+peter in case he has the nsIWebProgress notification order more fresh).
In any case, no rush. I need to go for the day now, but I'll double-check the notification order with the old bfcache. There's a chance that the test is using the new bfcache but with fission disabled it's not using the bfcache at all (in which case if the notification order matches then we can probably just fix the test).
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
In the case of bfcache because the location change in that case comes
with a "complete" state, which confuses the test.
Comment 4•3 years ago
|
||
I guess the question is that what notifications we get in the old bfcache.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
So that the location change doesn't appear to happen on an
already-loaded document. This matches the old bfcache.
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4ba1ab810f7c Fix notification order when coming out of the bfcache. r=smaug
Comment 7•3 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•