img-src-none-blocks.html (631B)
1 <!DOCTYPE html> 2 <meta http-equiv="Content-Security-Policy" content="img-src 'none';"> 3 <html> 4 <head> 5 <title>img element src attribute must match src list.</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 with 'none' source should not match"); 14 </script> 15 <img src='/content-security-policy/support/fail.png' 16 onload='t1.step(function() { assert_unreached("Image should not have loaded"); t1.done(); });' 17 onerror='t1.done();'> 18 19 </body> 20 </html>