Bug 1348549 - Await pageload in browser_bug822367 to avoid intermittents. r=nhnt11
authorJohann Hofmann <jhofmann@mozilla.com>
Thu, 08 Jun 2017 11:57:49 +0200
changeset 411351 68f271f79ce6630fc2c75c0d8f291a20e004b83e
parent 411350 bf13425e15f781c4616e23aee4484dcac66b1d21
child 411352 5378ea8f1894428451efbac3e5e225b34a348ff1
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnhnt11
bugs1348549, 822367
milestone55.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 1348549 - Await pageload in browser_bug822367 to avoid intermittents. r=nhnt11 MozReview-Commit-ID: 3riSv5BbJRb
browser/base/content/test/siteIdentity/browser_bug822367.js
--- a/browser/base/content/test/siteIdentity/browser_bug822367.js
+++ b/browser/base/content/test/siteIdentity/browser_bug822367.js
@@ -19,17 +19,17 @@ add_task(async function test() {
   var newTab = BrowserTestUtils.addTab(gBrowser);
   gBrowser.selectedTab = newTab;
   gTestBrowser = gBrowser.selectedBrowser;
   newTab.linkedBrowser.stop()
 
   // Mixed Script Test
   var url = HTTPS_TEST_ROOT + "file_bug822367_1.html";
   BrowserTestUtils.loadURI(gTestBrowser, url);
-  await BrowserTestUtils.browserLoaded(gTestBrowser);
+  await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
 });
 
 // Mixed Script Test
 add_task(async function MixedTest1A() {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
@@ -43,26 +43,26 @@ add_task(async function MixedTest1B() {
       "Waited too long for mixed script to run in Test 1");
   });
 });
 
 // Mixed Display Test - Doorhanger should not appear
 add_task(async function MixedTest2() {
   var url = HTTPS_TEST_ROOT_2 + "file_bug822367_2.html";
   BrowserTestUtils.loadURI(gTestBrowser, url);
-  await BrowserTestUtils.browserLoaded(gTestBrowser);
+  await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
 
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: false, passiveLoaded: false});
 });
 
 // Mixed Script and Display Test - User Override should cause both the script and the image to load.
 add_task(async function MixedTest3() {
   var url = HTTPS_TEST_ROOT + "file_bug822367_3.html";
   BrowserTestUtils.loadURI(gTestBrowser, url);
-  await BrowserTestUtils.browserLoaded(gTestBrowser);
+  await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
 });
 
 add_task(async function MixedTest3A() {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
   await BrowserTestUtils.browserLoaded(gTestBrowser);
@@ -81,17 +81,17 @@ add_task(async function MixedTest3B() {
 
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: true});
 });
 
 // Location change - User override on one page doesn't propogate to another page after location change.
 add_task(async function MixedTest4() {
   var url = HTTPS_TEST_ROOT_2 + "file_bug822367_4.html";
   BrowserTestUtils.loadURI(gTestBrowser, url);
-  await BrowserTestUtils.browserLoaded(gTestBrowser);
+  await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
 });
 
 add_task(async function MixedTest4A() {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
   await BrowserTestUtils.browserLoaded(gTestBrowser);
@@ -115,17 +115,17 @@ add_task(async function MixedTest4C() {
       "Mixed script loaded in test 4 after location change!");
   });
 });
 
 // Mixed script attempts to load in a document.open()
 add_task(async function MixedTest5() {
   var url = HTTPS_TEST_ROOT + "file_bug822367_5.html";
   BrowserTestUtils.loadURI(gTestBrowser, url);
-  await BrowserTestUtils.browserLoaded(gTestBrowser);
+  await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
 });
 
 add_task(async function MixedTest5A() {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
   await BrowserTestUtils.browserLoaded(gTestBrowser);
@@ -138,17 +138,17 @@ add_task(async function MixedTest5B() {
       "Waited too long for mixed script to run in Test 5");
   });
 });
 
 // Mixed script attempts to load in a document.open() that is within an iframe.
 add_task(async function MixedTest6() {
   var url = HTTPS_TEST_ROOT_2 + "file_bug822367_6.html";
   BrowserTestUtils.loadURI(gTestBrowser, url);
-  await BrowserTestUtils.browserLoaded(gTestBrowser);
+  await BrowserTestUtils.browserLoaded(gTestBrowser, false, url);
 });
 
 add_task(async function MixedTest6A() {
   gTestBrowser.removeEventListener("load", MixedTest6A, true);
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
 
   await BrowserTestUtils.waitForCondition(
     () => gIdentityHandler._identityBox.classList.contains("mixedActiveBlocked"),