Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/images/image-error-event-not-firing.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/images/image-error-event-not-firing.html b/third_party/WebKit/LayoutTests/http/tests/images/image-error-event-not-firing.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..177d4b6cbe2a766cd2e2049b3a9f17372ad7675c |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/images/image-error-event-not-firing.html |
| @@ -0,0 +1,13 @@ |
| +<!DOCTYPE html> |
| +<title>This tests onerror event is fired if we change image src to a url blocked by content-security-policy.</title> |
| +<meta http-equiv="Content-Security-Policy" content="img-src 'self'"> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<img src="../resources/image-error-event-not-firing-test-image.png"></img> |
|
fs
2016/08/16 10:42:42
We could arguably make this test more robust as we
fs
2016/08/16 10:44:55
Could probably also use one of the the square* fil
sivag
2016/08/16 11:54:21
Done.
sivag
2016/08/16 11:54:21
Done.
|
| +<script> |
| +async_test(function(t) { |
| + var img = document.querySelector("img"); |
| + img.onerror = t.step_func_done(); |
| + img.src = "http://127.0.0.1:8000/resources/image-error-event-not-firing-test-image.png"; |
| +}); |
| +</script> |