OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="/resources/testharness.js"></script> |
| 3 <script src="/resources/testharnessreport.js"></script> |
| 4 <body> |
| 5 <script> |
| 6 async_test(t => { |
| 7 var i = document.createElement('img'); |
| 8 i.onerror = t.assert_unreached; |
| 9 i.onload = t.step_func_done(_ => { |
| 10 assert_equals(128, i.naturalWidth); |
| 11 assert_equals(128, i.naturalHeight); |
| 12 }); |
| 13 i.src = "http://127.0.0.1:8080/security/resources/compass.jpg?t=1"; |
| 14 }, "Mixed images are allowed in the presence of 'block-all-mixed-content' in
report-only mode."); |
| 15 |
| 16 async_test(t => { |
| 17 var i = document.createElement('img'); |
| 18 i.onload = t.step_func_done(); |
| 19 document.addEventListener('securitypolicyviolation', t.assert_unreached)
; |
| 20 i.src = "http://127.0.0.1:8080/security/resources/compass.jpg?t=2"; |
| 21 }, "Mixed images do not generate CSP violation reports when no policy is pre
sent."); |
| 22 </script> |
OLD | NEW |