1
0
Fork 0
firefox/testing/web-platform/tests/import-maps/not-overridden/integrity.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

38 lines
827 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
const log = [];
</script>
<script type="importmap">
{
"imports": {
"../resources/log.js?pipe=sub&name=A": "../resources/log.js?pipe=sub&name=B"
},
"integrity": {
"../resources/log.js?pipe=sub&name=B": "sha384-PeZ0Scqs60QjpuvHAyomddrpcCuox9hUwAff1yx1Lv2HtPIAfsSuHi6VKGK3nH3w"
}
}
</script>
<script type="importmap">
{
"integrity": {
"../resources/log.js?pipe=sub&name=B": "sha384-foobar"
}
}
</script>
<script type="module">
import '../resources/log.js?pipe=sub&name=A';
</script>
<script type="module">
test(t => {
assert_array_equals(log, ["log:B"]);
}, 'Static script loaded as its integrity check passed');
</script>
</body>
</html>