[JSC] Specifying same module entry point multiple times cause TypeError
[WebKit-https.git] / LayoutTests / js / dom / modules / module-load-same-module-from-different-entry-point-in-src.html
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../../../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <script>
8 description('2 different module tag will attempt to load the same module with "src" attribute.');
9 window.jsTestIsAsync = true;
10 window.moduleExecutedCount = 0;
11 debug('Module is not executed yet.');
12 shouldBe(`window.moduleExecutedCount`, `0`);
13 var counter = 0;
14 function onLoad() {
15     shouldBe(`window.moduleExecutedCount`, `1`);
16     ++counter;
17 }
18 function finish() {
19     shouldBe(`counter`, `2`);
20     finishJSTest();
21 }
22
23 </script>
24 <script src="../../../resources/js-test-post.js"></script>
25 <script type="module" src="./script-tests/module-load-same-module-from-different-entry-point.js" onload="onLoad()"></script>
26 <script type="module" src="./script-tests/module-load-same-module-from-different-entry-point.js" onload="onLoad()"></script>
27 <script type="module">
28 finish();
29 </script>
30 </body>
31 </html>