| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worklet-import-blocked.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worklet-import-blocked.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worklet-import-blocked.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..aacff764bbb8013e7ca62ec491c97545e1b925c5
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worklet-import-blocked.html
|
| @@ -0,0 +1,22 @@
|
| +<!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 paintWorklet.import('/resources/worklet.js').then(function(undefined_arg) {
|
| + assert_unreached('import should fail.')
|
| + }).catch(function(error) {
|
| + assert_equals(error.name, 'NetworkError', 'error should be a NetworkError.');
|
| + });
|
| +
|
| + }, 'Importing a script rejects the given promise with NetworkError because it violated the same origin CSP policy.');
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|