Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worklet-import-blocked.html

Issue 2826983002: Rename Worklet.import() to Worklet.addModule(). (Closed)
Patch Set: Fixing Layout Tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/testharness.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script> 5 <script src="../../resources/testharnessreport.js"></script>
6 <meta http-equiv="Content-Security-Policy" content="default-src 'none';script-sr c 'unsafe-inline'"/> 6 <meta http-equiv="Content-Security-Policy" content="default-src 'none';script-sr c 'unsafe-inline'"/>
7 7
8 </head> 8 </head>
9 <body> 9 <body>
10 <script> 10 <script>
11 promise_test(function() { 11 promise_test(function() {
12 12
13 return paintWorklet.import('/resources/worklet.js').then( 13 return paintWorklet.addModule('/resources/worklet.js').then(
14 function(undefined_arg) { 14 function(undefined_arg) {
15 assert_unreached('import should fail.') 15 assert_unreached('addModule should fail.')
16 }, 16 },
17 function(error) { 17 function(error) {
18 assert_equals(error.name, 'NetworkError', 'error should be a Net workError.'); 18 assert_equals(error.name, 'NetworkError', 'error should be a Net workError.');
19 }); 19 });
20 20
21 }, 'Importing a script rejects the given promise with NetworkError because i t violated the same origin CSP policy.'); 21 }, 'Importing a script rejects the given promise with NetworkError because i t violated the same origin CSP policy.');
22 </script> 22 </script>
23 </body> 23 </body>
24 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698