img-src-host-partial-wildcard-allowed.sub.html (714B)
1 <!DOCTYPE html> 2 <meta http-equiv="Content-Security-Policy" content="img-src *.{{host}}:{{ports[http][0]}}"> 3 <html> 4 <head> 5 <title>img-src works correctly with partial host wildcard.</title> 6 <script src='/resources/testharness.js'></script> 7 <script src='/resources/testharnessreport.js'></script> 8 </head> 9 <body> 10 <div id='log'></div> 11 12 <script> 13 var t1 = async_test("img src matches correctly partial wildcard host csp directive"); 14 </script> 15 <img src='http://{{domains[www]}}:{{ports[http][0]}}/content-security-policy/support/pass.png' 16 onload='t1.done();' 17 onerror='t1.step(function() { assert_unreached("Image should have loaded"); t1.done(); });'> 18 19 </body> 20 </html>