Some tests await on BrowserTestUtils.loadURIString, that doesn't wait for load
Categories
(Firefox :: Address Bar, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox119 | --- | fixed |
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(3 files)
This is quite confusing, BrowserTestUtils.loadURIString() doesn't wait for load, but the javadoc is unclear about that, and some tests are awaiting on it.
I initially thought to make it wait, and then consumers could optionally use the promise... through awaiting requires to add listeners that potentially may remain at the end of the test, if the test doesn't await for the promise, and that could cause other intermittents.
Different tests have different needs so just awaiting is not good for all of them.
Thus, I'm thinking to rename BrowserTestUtils.loadURIString() to BrowserTestUtils.startLoadingURIString(), that should make a bit clearer it's only starting the load, not awaiting for its completion... plus updating its javadoc.
This is actually causing intermittents, like bug 1775820.
| Assignee | ||
Comment 1•2 years ago
|
||
BrowserTestUtils.loadURIString() is not async, nor returning a promise, it's
effectively not awaiting for the page to be loaded.
| Assignee | ||
Comment 2•2 years ago
|
||
BrowserTestUtils.browserLoaded() wants a tabbrowser-tab as input, most of it will
also work passing gBrowser, and indeed some tests ended up doing that.
Unfortunately some parts of it are skipped in that case.
Since it's confusing anyway, let's make it more lenient on its input.
Depends on D188211
| Assignee | ||
Comment 3•2 years ago
|
||
This should make a bit clearer that it is only starting the load, not waiting
for its completion.
Depends on D188212
Comment 5•2 years ago
|
||
Backed out for causing remote failures on remote/shared/messagehandler/test/browser/browser_session_data.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/71df25fbac58fb3bd1a743700efb73f291e1712a
| Assignee | ||
Updated•2 years ago
|
Comment 7•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5f3627b190cf
https://hg.mozilla.org/mozilla-central/rev/f4052dc7a73a
https://hg.mozilla.org/mozilla-central/rev/6b4b7a682e7a
Comment 9•2 years ago
|
||
| bugherder | ||
Description
•