Bug 1581477 - enable dom/serviceworkers/test/test_third_party_iframes.html for fission r=dom-workers-and-storage-reviewers,perry

Differential Revision: https://phabricator.services.mozilla.com/D56944

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eden Chuang 2019-12-17 07:17:13 +00:00
parent d28cd2116b
commit 9631b4bcb3
3 changed files with 21 additions and 10 deletions

View File

@ -317,8 +317,6 @@ skip-if = serviceworker_e10s
[test_streamfilter.html]
[test_strict_mode_warning.html]
[test_third_party_iframes.html]
skip-if =
fission # Fails uncleanly: /tests/dom/serviceworkers/test/test_third_party_iframes.html logged result after SimpleTest.finish(): This test left a service worker registered without cleaning it up
support-files =
window_party_iframes.html
[test_unregister.html]

View File

@ -39,9 +39,7 @@ let basePath = "/tests/dom/serviceworkers/test/thirdparty/";
let origin = window.location.protocol + "//" + window.location.host;
let thirdPartyOrigin = "https://example.com";
function testIframeLoaded() {
ok(true, "Iframe loaded");
iframe.removeEventListener("load", testIframeLoaded);
function loadIframe() {
let message = {
source: "parent",
href: origin + basePath + "iframe2.html"
@ -92,9 +90,11 @@ function testShouldIntercept(behavior, lifetime, done) {
}, {
status: "registrationdone",
next() {
iframe.addEventListener("load", testIframeLoaded);
iframe.src = origin + basePath + "iframe1.html";
}
}, {
status: "iframeloaded",
next: loadIframe
}, {
status: "networkresponse",
}, {
@ -131,9 +131,11 @@ function testShouldNotRegister(behavior, lifetime, done) {
runTest([{
status: "registrationfailed",
next() {
iframe.addEventListener("load", testIframeLoaded);
iframe.src = origin + basePath + "iframe1.html";
}
}, {
status: "iframeloaded",
next: loadIframe
}, {
status: "networkresponse",
}, {
@ -174,11 +176,13 @@ function testShouldNotIntercept(behavior, lifetime, done) {
proxyWindow = window.open("window_party_iframes.html");
proxyWindow.onload = _ => {
iframe = proxyWindow.document.querySelector("iframe");
iframe.addEventListener("load", testIframeLoaded);
iframe.src = origin + basePath + "iframe1.html";
}
});
}
}, {
status: "iframeloaded",
next: loadIframe
}, {
status: "networkresponse",
}, {
@ -204,7 +208,6 @@ function testShouldNotIntercept(behavior, lifetime, done) {
proxyWindow = window.open("window_party_iframes.html");
proxyWindow.onload = _ => {
iframe = proxyWindow.document.querySelector("iframe");
iframe.addEventListener("load", testIframeLoaded);
iframe.src = thirdPartyOrigin + basePath + "unregister.html";
}
});

View File

@ -25,7 +25,17 @@
</head>
<body onload="window.addEventListener('message', messageListener, false);">
<body>
<script>
onload = function() {
window.addEventListener('message', messageListener);
let message = {
source: "iframe",
status: "iframeloaded",
}
parent.postMessage(message, "*");
}
</script>
<iframe id="iframe2"></iframe>
</body>