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

Unified Diff: LayoutTests/http/tests/images/image-currentsrc-error.html

Issue 317723003: Split image-currentsrc test into 3 separate tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
Index: LayoutTests/http/tests/images/image-currentsrc-error.html
diff --git a/LayoutTests/http/tests/images/image-currentsrc-error.html b/LayoutTests/http/tests/images/image-currentsrc-error.html
new file mode 100644
index 0000000000000000000000000000000000000000..48348ee10c8a796fd7c45e86e3a6c449a8f686cb
--- /dev/null
+++ b/LayoutTests/http/tests/images/image-currentsrc-error.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script src="/js-test-resources/js-test.js"></script>
+<body>
+<script>
+ document.body.innerHTML += '<img id="error" srcset="http://127.0.0.1:8000/resources/slow-image.php?name=not_there.png&mimeType=image/png&sleep=100">';
+ jsTestIsAsync = true;
+ var img_err = window.document.getElementById("error");
+ img_err.onerror = function() {
+ shouldBe('img_err.currentSrc', '"http://127.0.0.1:8000/resources/slow-image.php?name=not_there.png&mimeType=image/png&sleep=100"');
+ };
+
+ window.onload = function() {
+ finishJSTest();
+ };
+</script>
+</body>
« no previous file with comments | « LayoutTests/http/tests/images/image-currentsrc.html ('k') | LayoutTests/http/tests/images/image-currentsrc-error-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698