Bug 1346286 - Remove CPOWs from browser_bug1045809.js. r=Gijs
MozReview-Commit-ID: HN2vih432Ou
--- 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");
+ });
}