| <!DOCTYPE html> |
| <!-- |
| This test was modified to not use the HTML4 intrinsic events 'img onload=' or |
| 'img=onerror' or to check the img element size. |
| --> |
| <html> |
| |
| <head> |
| <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> |
| <title>image-full-host-wildcard-allowed</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="../support/logTest.sub.js?logs=[]"></script> |
| <script src='../support/alertAssert.sub.js?alerts=["PASS"]'></script> |
| <!-- enforcing policy: |
| img-src http://*.{{host}}:{{ports[http][0]}}; script-src 'self' 'unsafe-inline' 'unsafe-inline'; connect-src 'self'; |
| --> |
| </head> |
| |
| <body> |
| <div id='t1'></div> |
| <script> |
| var t1img = document.createElement('img'); |
| t1img.onload = function() { alert_assert('PASS'); } |
| t1img.onerror = function() { alert_assert('FAIL'); } |
| t1img.src = 'http://www1.{{host}}:{{ports[http][0]}}/content-security-policy/support/pass.png'; |
| var t1div = document.getElementById('t1'); |
| t1div.appendChild(t1img); |
| </script> |
| <div id="log"></div> |
| <script async defer src="../support/checkReport.sub.js?reportExists=false"></script> |
| </body> |
| |
| </html> |