Bug 1346286 - Remove CPOWs from browser_bug1045809.js. r=Gijs draft
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 09 Mar 2017 17:14:00 -0800
changeset 499555 546079904b670b325da9cbfade87525127c5dbe4
parent 499554 2763cf2fae9a306d3900709ee240ddc823d12f8d
child 499556 f1c8ea9f7e2d99936d1240c69b292515e3ad7df5
push id49450
push userbmo:mrbkap@mozilla.com
push dateWed, 15 Mar 2017 23:51:54 +0000
reviewersGijs
bugs1346286, 1045809
milestone55.0a1
Bug 1346286 - Remove CPOWs from browser_bug1045809.js. r=Gijs MozReview-Commit-ID: HN2vih432Ou
browser/base/content/test/siteIdentity/browser_bug1045809.js
--- a/browser/base/content/test/siteIdentity/browser_bug1045809.js
+++ b/browser/base/content/test/siteIdentity/browser_bug1045809.js
@@ -30,31 +30,37 @@ add_task(function* () {
   // Test 3: mixed content must be blocked again
   yield promiseTabLoadEvent(tab);
   yield* test3(gBrowser.getBrowserForTab(tab));
 });
 
 function* test1(gTestBrowser) {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
-  var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
-  is(x, null, "Mixed Content is NOT to be found in Test1");
+  yield ContentTask.spawn(gTestBrowser, null, function() {
+    var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
+    is(x, null, "Mixed Content is NOT to be found in Test1");
+  });
 
   // Disable Mixed Content Protection for the page (and reload)
   gIdentityHandler.disableMixedContentProtection();
 }
 
 function* test2(gTestBrowser) {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: false});
 
-  var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
-  isnot(x, null, "Mixed Content is to be found in Test2");
+  yield ContentTask.spawn(gTestBrowser, null, function() {
+    var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
+    isnot(x, null, "Mixed Content is to be found in Test2");
+  });
 
   // Re-enable Mixed Content Protection for the page (and reload)
   gIdentityHandler.enableMixedContentProtection();
 }
 
 function* test3(gTestBrowser) {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
-  var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
-  is(x, null, "Mixed Content is NOT to be found in Test3");
+  yield ContentTask.spawn(gTestBrowser, null, function() {
+    var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
+    is(x, null, "Mixed Content is NOT to be found in Test3");
+  });
 }