Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/images/image-error-event-not-firing.html

Issue 2227423002: Use testharness.js instead of js-test.js in fast/images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/images/natural-dimensions-correct-after-image-reset-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2db2bf54d4b44771fdb7944b6d0ac5a188ff5f66
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/images/image-error-event-not-firing.html
@@ -0,0 +1,14 @@
+<!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/square.png"></img>
+<script>
+//TODO(siva.gunturi): Verify that the initial reference loads ok.
+async_test(function(t) {
+ var img = document.querySelector("img");
+ img.onerror = t.step_func_done();
+ img.src = "http://127.0.0.1:8080/resources/square.png";
+});
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/images/natural-dimensions-correct-after-image-reset-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698