/** Test for Bug 660404 */
SimpleTest.waitForExplicitFinish();
var textContent =
` var bc = new BroadcastChannel("bug660404_multipart");
bc.postMessage({command: "finishTest",
textContent: window.document.documentElement.textContent,
innerHTML: window.document.documentElement.innerHTML
});
bc.close();
window.close();
`; var innerHTML =
`<head><script> var bc = new BroadcastChannel("bug660404_multipart");
bc.postMessage({command: "finishTest",
textContent: window.document.documentElement.textContent,
innerHTML: window.document.documentElement.innerHTML
});
bc.close();
window.close();
</`
// eslint-disable-next-line no-useless-concat
+ `script></head>`
;
SimpleTest.enableLegacyUnpartitionedStorage().then(() => { var bc_multipart = new BroadcastChannel("bug660404_multipart");
bc_multipart.onmessage = (msgEvent) => { var msg = msgEvent.data; varcommand = msg.command;
if (command == "finishTest") {
is(msg.textContent, textContent);
is(msg.innerHTML, innerHTML);
bc_multipart.close();
SimpleTest.finish();
}
} var bc = new BroadcastChannel("bug660404");
bc.onmessage = (msgEvent) => { var msg = msgEvent.data; varcommand = msg.command;
if (command == "pagehide") {
is(msg.persisted, true, "Should be bfcached when navigating to multipart");
bc.close();
}
}
// If Fission is disabled, the pref is no-op.
SpecialPowers.pushPrefEnv({set: [["fission.bfcacheInParent", true]]}, () => {
// Have to open a new window, since there's no bfcache in subframes
window.open("file_bug660404-1.html", "", "noopener");
});
});
</script>
</pre>
</body>
</html>
¤ Dauer der Verarbeitung: 0.36 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.