prefetch-allowed-with-conflicting-permissive-policies.html (912B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src='/resources/testharness.js'></script> 5 <script src='/resources/testharnessreport.js'></script> 6 <script src='/common/utils.js'></script> 7 <script src='/content-security-policy/support/testharness-helper.js'></script> 8 <script src='/content-security-policy/support/prefetch-helper.js'></script> 9 <!-- These policies are for test-harness itself--> 10 <meta http-equiv="Content-Security-Policy" content="default-src 'unsafe-inline'; img-src *; connect-src 'none'"> 11 <meta http-equiv="Content-Security-Policy" content="default-src 'unsafe-inline'; img-src 'none'; connect-src *"> 12 <script> 13 promise_test(async t => { 14 assert_true(await try_to_prefetch("/common/dummy.xml", t)); 15 }, 'Prefetch should succeed when a directive in a policy is permissive, ' + 16 'even if a subsequent policy overrides that.'); 17 </script> 18 </head> 19 <body> 20 </body> 21 </html>