blob: 387abf0e048e846a9198034d5e14adaf605c0fb1 [file] [log] [blame] [edit]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('2 different module tag will attempt to load the same module');
debug('Currently, this is not defined in the spec. This issue should be fixed in the future.');
// Module will be executed asynchronously.
window.jsTestIsAsync = true;
window.moduleExecutedCount = 0;
debug('Module is not executed yet.');
shouldBe(`window.moduleExecutedCount`, `0`);
var counter = 0;
function onLoad() {
shouldBe(`window.moduleExecutedCount`, `1`);
if (++counter === 2) {
shouldBeTrue(`window.firstModuleIsExecuted`);
shouldBeTrue(`window.secondModuleIsExecuted`);
finishJSTest();
}
}
</script>
<script src="../../../resources/js-test-post.js"></script>
<script type="module">
import "./resources/module-load-same-module-from-different-entry-point.js"
debug('Executing the module.');
window.firstModuleIsExecuted = true;
onLoad();
</script>
<script type="module">
import "./resources/module-load-same-module-from-different-entry-point.js"
debug('Executing the module.');
window.secondModuleIsExecuted = true;
onLoad();
</script>
</body>
</html>