blob: 76948e8ab39bcb892e27de05225a195d2a54fcf8 [file] [log] [blame]
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<script>
description(`This test loads a secure iframe that attempt to import() a module script via HTTP.
Since the iframe's content is of a secure origin, importing a module script via HTTP should result
in a mixed content error.
`);
window.jsTestIsAsync = true;
window.data = null;
window.addEventListener("message", function (error) {
window.data = error.data;
shouldBe(`window.data`, `"TypeError: Importing a module script failed."`);
finishJSTest();
}, false);
</script>
<script src="../../resources/js-test-post.js"></script>
<p></p>
<iframe src="https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-import.html"></iframe>
</body>
</html>