blob: e05493d8d7e1661c7243af35d39ce9072caf4181 [file] [log] [blame]
<!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" onload="onLoad()">
import "./resources/module-load-same-module-from-different-entry-point.js"
debug('Executing the module.');
window.firstModuleIsExecuted = true;
</script>
<script type="module" onload="onLoad()">
import "./resources/module-load-same-module-from-different-entry-point.js"
debug('Executing the module.');
window.secondModuleIsExecuted = true;
</script>
</body>
</html>