Bug 1645759 - Make the test browser_bug1045809.js Fission-compatible. r=ckerschb

Differential Revision: https://phabricator.services.mozilla.com/D79661
This commit is contained in:
Tim Huang 2020-06-15 14:05:09 +00:00
Родитель 421c78970d
Коммит 844d817b8f
2 изменённых файлов: 18 добавлений и 13 удалений

Просмотреть файл

@ -34,7 +34,6 @@ support-files =
file_bug906190.js
file_bug906190.sjs
[browser_bug1045809.js]
fail-if = fission
tags = mcb
support-files =
file_bug1045809_1.html

Просмотреть файл

@ -55,10 +55,12 @@ async function test1(gTestBrowser) {
});
await SpecialPowers.spawn(gTestBrowser, [], function() {
var x = content.document
.getElementsByTagName("iframe")[0]
.contentDocument.getElementById("mixedContentContainer");
is(x, null, "Mixed Content is NOT to be found in Test1");
let iframe = content.document.getElementsByTagName("iframe")[0];
SpecialPowers.spawn(iframe, [], () => {
let container = content.document.getElementById("mixedContentContainer");
is(container, null, "Mixed Content is NOT to be found in Test1");
});
});
// Disable Mixed Content Protection for the page (and reload)
@ -73,10 +75,12 @@ async function test2(gTestBrowser) {
});
await SpecialPowers.spawn(gTestBrowser, [], function() {
var x = content.document
.getElementsByTagName("iframe")[0]
.contentDocument.getElementById("mixedContentContainer");
isnot(x, null, "Mixed Content is to be found in Test2");
let iframe = content.document.getElementsByTagName("iframe")[0];
SpecialPowers.spawn(iframe, [], () => {
let container = content.document.getElementById("mixedContentContainer");
isnot(container, null, "Mixed Content is to be found in Test2");
});
});
// Re-enable Mixed Content Protection for the page (and reload)
@ -91,9 +95,11 @@ async function test3(gTestBrowser) {
});
await SpecialPowers.spawn(gTestBrowser, [], function() {
var x = content.document
.getElementsByTagName("iframe")[0]
.contentDocument.getElementById("mixedContentContainer");
is(x, null, "Mixed Content is NOT to be found in Test3");
let iframe = content.document.getElementsByTagName("iframe")[0];
SpecialPowers.spawn(iframe, [], () => {
let container = content.document.getElementById("mixedContentContainer");
is(container, null, "Mixed Content is NOT to be found in Test3");
});
});
}