Bug 1511465: Fix race condition in browser_oversized.js. r=mak
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 05 Dec 2018 19:03:36 +0000
changeset 508656 b551becf88cfa065b2394e2262836b3207464898
parent 508655 f2574f5b186e520f5ee9a1626c8bc828f2761bf1
child 508657 4ad8241eb92a80771580ac497e4e4c2468f861da
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1511465
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1511465: Fix race condition in browser_oversized.js. r=mak Seems that when run as the first test in a test run there is a race for whether the favicon for the initial tab has already been seen or not. Rarely we fail the race and end up seeing a successful favicon load. This makes us ignore any favicons other than the one we're interested in. Differential Revision: https://phabricator.services.mozilla.com/D13838
browser/base/content/test/favicons/browser_oversized.js
--- a/browser/base/content/test/favicons/browser_oversized.js
+++ b/browser/base/content/test/favicons/browser_oversized.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const ROOT = "http://mochi.test:8888/browser/browser/base/content/test/favicons/";
 
 add_task(async () => {
   await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, async (browser) => {
-    let faviconPromise = waitForFaviconMessage();
+    let faviconPromise = waitForFaviconMessage(true, `${ROOT}large.png`);
 
     BrowserTestUtils.loadURI(browser, ROOT + "large_favicon.html");
     await BrowserTestUtils.browserLoaded(browser);
 
     await Assert.rejects(faviconPromise, result => {
       return result.iconURL == `${ROOT}large.png`;
     }, "Should have failed to load the large icon.");
   });