Bug 1602318 - Make sure we wait for the right load to finish. r=kmag
authorMatt Woodrow <mwoodrow@mozilla.com>
Sun, 26 Apr 2020 00:50:02 +0000
changeset 526100 d4dd2b03884ddaa1c1ac57c37a74d5c1e21d7369
parent 526099 e571f05c40db1bff5520327762c58a48df10391f
child 526101 7e2902385a6e05baf46e7f8739299203ff5fb7f5
push id37350
push usernbeleuzu@mozilla.com
push dateSun, 26 Apr 2020 09:43:12 +0000
treeherdermozilla-central@21659f178a12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1602318
milestone77.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 1602318 - Make sure we wait for the right load to finish. r=kmag r.js Differential Revision: https://phabricator.services.mozilla.com/D67099
browser/base/content/test/tabs/browser_e10s_switchbrowser.js
--- a/browser/base/content/test/tabs/browser_e10s_switchbrowser.js
+++ b/browser/base/content/test/tabs/browser_e10s_switchbrowser.js
@@ -66,17 +66,17 @@ function clear_history() {
 var waitForLoad = async function(uri) {
   info("Loading " + uri);
   // Longwinded but this ensures we don't just shortcut to LoadInNewProcess
   let loadURIOptions = {
     triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
   };
   gBrowser.selectedBrowser.webNavigation.loadURI(uri, loadURIOptions);
 
-  await BrowserTestUtils.browserStopped(gBrowser);
+  await BrowserTestUtils.browserStopped(gBrowser, uri);
 
   // Some of the documents we're using in this test use Fluent,
   // and they may finish localization later.
   // To prevent this test from being intermittent, we'll
   // wait for the `document.l10n.ready` promise to resolve.
   if (
     gBrowser.selectedBrowser.contentWindow &&
     gBrowser.selectedBrowser.contentWindow.document.l10n
@@ -96,17 +96,17 @@ var waitForLoadWithFlags = async functio
   flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE
 ) {
   info("Loading " + uri + " flags = " + flags);
   gBrowser.selectedBrowser.loadURI(uri, {
     flags,
     triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
   });
 
-  await BrowserTestUtils.browserStopped(gBrowser);
+  await BrowserTestUtils.browserStopped(gBrowser, uri);
   if (!(flags & Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY)) {
     if (flags & Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY) {
       gExpectedHistory.entries.pop();
     } else {
       gExpectedHistory.index++;
     }
 
     gExpectedHistory.entries.push({