blob: 90d1c444dc361ee3b0b6c66249a141ad3dec8c6e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="default-src 'none';script-src 'unsafe-inline'"/>
</head>
<body>
<script>
promise_test(function() {
return CSS.paintWorklet.addModule('/resources/worklet.js').then(
function(undefined_arg) {
assert_unreached('addModule should fail.')
},
function(error) {
assert_equals(error.name, 'AbortError', 'error should be an AbortError.');
});
}, 'Importing a script rejects the given promise with AbortError because it violated the same origin CSP policy.');
</script>
</body>
</html>