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

Unified Diff: LayoutTests/http/tests/images/image-currentsrc-load.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-load.html
diff --git a/LayoutTests/http/tests/images/image-currentsrc.html b/LayoutTests/http/tests/images/image-currentsrc-load.html
similarity index 52%
rename from LayoutTests/http/tests/images/image-currentsrc.html
rename to LayoutTests/http/tests/images/image-currentsrc-load.html
index e069969ba249f8c3ad2d08c285142002183a9437..48364203f1461436561cecf55a7f9c6c33eee12e 100644
--- a/LayoutTests/http/tests/images/image-currentsrc.html
+++ b/LayoutTests/http/tests/images/image-currentsrc-load.html
@@ -3,8 +3,6 @@
<body>
<script>
document.body.innerHTML += '<img id="load" src="http://127.0.0.1:8000/resources/slow-image.php?name=square100.png&mimeType=image/png&sleep=100">';
- 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=300">';
- document.body.innerHTML += '<img id="redirect" src="http://127.0.0.1:8000/resources/slow-image.php?redirect_name=square100.png&mimeType=image/png&sleep=500">';
jsTestIsAsync = true;
var img = window.document.getElementById("load");
shouldBe('img.currentSrc', '""');
@@ -14,15 +12,6 @@
shouldBe('img.currentSrc', 'expectedCurrentSrc');
expectedCurrentSrc = "http://127.0.0.1:8000/resources/slow-image.php?name=square200.png&mimeType=image/png&sleep=100";
};
- 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=300"');
- };
-
- var img_redirect = window.document.getElementById("redirect");
- img_redirect.onload = function() {
- shouldBe('img_redirect.currentSrc', '"http://127.0.0.1:8000/resources/slow-image.php?redirect_name=square100.png&mimeType=image/png&sleep=500"');
- };
window.onload = function() {
finishJSTest();
};

Powered by Google App Engine
This is Rietveld 408576698