blob: af7a7010d04fd136f20b280eae42d892b36c0748 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('Test script.onerror will be fired when the resource specified by the import declaration in the inlined module is not found.');
// Module will be executed asynchronously.
window.jsTestIsAsync = true;
debug('Module is not executed yet.');
var error = null;
function onError()
{
error = window.event;
}
</script>
<script src="../../../resources/js-test-post.js"></script>
<script type="module" onerror="onError()">
import "./not-found.js";
testFailed('executed');
</script>
<script type="module">
shouldNotBe(`error`, `null`);
shouldBe(`error.type`, `"error"`);
finishJSTest()
</script>
</body>
</html>