blob: d0e75854530e56d3ac5b0a304135ec5b1064cb53 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('Test inlined module.');
// Module will be executed asynchronously.
window.jsTestIsAsync = true;
</script>
<script>
debug('Module is not executed yet.');
</script>
<script src="../../../resources/js-test-post.js"></script>
<script type="module">
import Cocoa from "./resources/module-inline-simple.js";
var cocoa = new Cocoa();
debug("Module execution is confined in the module environment.");
shouldBeEqualToString("typeof cocoa", "undefined");
window.exportedCocoa = cocoa;
shouldBeEqualToString("typeof exportedCocoa", "object");
shouldBeEqualToString("exportedCocoa.taste()", "awesome");
finishJSTest();
</script>
</body>
</html>