Closed Bug 1491998 Opened 7 years ago Closed 7 years ago

Make browser_ext_chrome_settings_overrides_home.js wait for the right load to avoid race conditions

Categories

(WebExtensions :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

The test does: let windowOpenedPromise = BrowserTestUtils.waitForNewWindow(); let win = OpenBrowserWindow(); await windowOpenedPromise; await BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser); let doc = win.document; This is meant to wait for the extension homepage to load. However, it's possible for the page to have loaded by the time that we create the browserLoaded promise, because loading happens async when the window is created. This becomes likely enough with my changes in bug 1362774 (which avoid wasting time when creating the window by first trying to load about:blank in it) that the test intermittently fails. Instead, the test can just tell `BTU.waitForNewWindow` to wait for the extension homepage load that it's expecting directly, making it more reliable and removing the need for the separate loading check.
Comment on attachment 9009781 [details] Bug 1491998 - Fix browser_ext_chrome_settings_overrides_home.js to wait for the correct load, r?aswan Andrew Swan [:aswan] has approved the revision.
Attachment #9009781 - Flags: review+
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b06f42d2b540 Fix browser_ext_chrome_settings_overrides_home.js to wait for the correct load, r=aswan
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Hello, will manual testing be required here? if so please provide some info onto how it should be tested, otherwise please set the qe-verify- flag. Thanks!
Flags: needinfo?(gijskruitbosch+bugs)
This was a change to an automated test, so no manual verification is required.
Flags: needinfo?(gijskruitbosch+bugs) → qe-verify-
Blocks: 1497921
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: