Closed Bug 1530667 Opened 6 months ago Closed 6 months ago

browser_allow_process_switches_despite_related_browser.js times out locally

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Attachments

(1 file)

Not sure why treeherder is not complaining, but sometimes I want to run all tab tests locally with ./mach test browser/base/content/test/tabs/, and it's very annoying that browser_allow_process_switches_despite_related_browser.js times out.

The problem is that it does

const uriString = Services.io.newFileURI(dummyPage).spec;
let viewSourceBrowser = viewSourceTab.linkedBrowser;
let promiseLoad = BrowserTestUtils.browserLoaded(viewSourceBrowser, false, uriString);
BrowserTestUtils.loadURI(viewSourceBrowser, uriString);
let href = await promiseLoad;
is(href, uriString,

uriString is "file:///<moz-objdir>/_tests/testing/mochitest/browser/browser/base/content/test/tabs/dummy_page.html"

However, this is just a symlink which points to "file:///<moz-source>/browser/base/content/test/tabs/dummy_page.html"

That's the URL that it's loaded in viewSourceBrowser, so promiseLoad is never resolved. https://searchfox.org/mozilla-central/rev/b10ae6b7a50d176a813900cbe9dc18c85acd604b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm#345,360

And even if it would resolve, the is(href, uriString check at the end would fail.

dummyPage needs to be normalized.

Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/faf6df595f9f
Fix browser_allow_process_switches_despite_related_browser.js timeout. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
See Also: → 1530893
You need to log in before you can comment on or make changes to this bug.