Implement dynamic-import for WebCore
[WebKit-https.git] / LayoutTests / http / tests / security / import-script-crossorigin-loads-omit.html
1 <body>
2 <p>This test passes if the module script loads.</p>
3 <pre></pre>
4 <script crossorigin="use-credentials">
5 if (window.testRunner) {
6     testRunner.dumpAsText();
7     testRunner.waitUntilDone();
8 }
9
10 function done(msg) {
11     document.querySelector("pre").innerHTML = msg;
12     if (window.testRunner)
13         testRunner.notifyDone();
14 }
15
16 // Executed with "omit".
17 // https://github.com/tc39/proposal-dynamic-import/blob/master/HTML%20Integration.md
18 import("http://localhost:8000/security/resources/cors-script.php?credentials=false").then(
19     function() { done("PASS");},
20     function() { done("FAIL"); });
21 </script>