Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /import-maps/multiple-import-maps/with-errors.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({allow_uncaught_exception : true});
const log = [];
</script>
<script type="importmap" onerror="log.push('onerror 1')">
Parse Error
</script>
<script type="importmap" onerror="log.push('onerror 2')">
{
"imports": {
"../resources/log.js?pipe=sub&name=A": "../resources/log.js?pipe=sub&name=C"
}
}
</script>
<script>
promise_test(() => {
return import("../resources/log.js?pipe=sub&name=A")
.then(() => assert_array_equals(
log,
["log:C"]))
},
"Second import map should be used for resolution even after an import map with errors");
</script>