blob: fc6b7514f47e02d0c3064a2f2c0d214a2d661eb6 [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 dependent 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" src="resources/module-not-found-error-event-with-src-and-import.js" onerror="onError()"></script>
<script type="module">
shouldNotBe(`error`, `null`);
shouldBe(`error.type`, `"error"`);
finishJSTest()
</script>
</body>
</html>