OLD | NEW |
(Empty) | |
| 1 <script src=/resources/testharness.js></script> |
| 2 <script src=/resources/testharnessreport.js></script> |
| 3 <div id=log></div> |
| 4 <script> |
| 5 // Note: images get always sniffed, nosniff doesn't do anything |
| 6 var passes = ["", "?type=", "?type=x", "?type=x/x", "?type=image/gif", "?type=
image/png", "?type=image/png;blah"] |
| 7 |
| 8 passes.forEach(function(urlpart) { |
| 9 async_test(function(t) { |
| 10 var img = document.createElement("img") |
| 11 img.onerror = t.unreached_func("Unexpected error event") |
| 12 img.onload = t.step_func_done(function(){ |
| 13 assert_equals(img.width, 96) |
| 14 }) |
| 15 img.src = "resources/image.py" + urlpart |
| 16 document.body.appendChild(img) |
| 17 }, "URL query: " + urlpart) |
| 18 }) |
| 19 </script> |
OLD | NEW |