BrowserTestUtils.waitForLoad should skip about:blank by default
Categories
(Testing :: Mochitest, enhancement)
Tracking
(firefox143 fixed)
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: vhilla, Assigned: vhilla)
References
Details
Attachments
(1 external file, 1 obsolete file)
After bug 543435, an initial navigation to about:blank will happen synchronously. During our work, that broke many tests that used BrowsingTestUtils.browserLoaded as it resolved unexpectedly for about:blank. As a follow-up / clean-up once bug 543435 landed, we could look into browserLoaded skipping about:blank unless explicitly passed to wantLoad.
Also see https://phabricator.services.mozilla.com/D155376#inline-1376767
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
This will be helpful for bug 543435.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Backed out for causing failures at browser_bug627234_perwindowpb.js.
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/3a3895fe70d890da681cdf0264853b1440586bee
Failure log: https://treeherder.mozilla.org/logviewer?job_id=520418326&repo=autoland&lineNumber=10672
| Assignee | ||
Comment 6•1 year ago
|
||
Ah, I had the same issue with dom/tests/browser/browser_ConsoleStoragePBTest_perwindowpb.js.
The method whenNewWindowLoaded in browser_bug627234_perwindowpb.js waits for load on the browser window but that doesn't guarantee the browser is fully loaded. I'm not sure how exactly, but this startLoadingURIString testURI flakily gets overwritten by an initial content document that is either about:blank or about:privatebrowsing. An easy fix is to use BrowserTestUtils.openNewBrowserWindow({ private }) which waits for BrowserTestUtils:ContentEvent:load instead of load.
I pushed to try with --rebuild 3 and both opt, debug in case there are more flaky failures: https://treeherder.mozilla.org/jobs?repo=try&revision=9e1567f276a1a2df8e8bc399e6b3a4f2c4d91a38
Comment 8•1 year ago
|
||
| bugherder | ||
Description
•