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

Unified Diff: LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html

Issue 136693020: Add image loading spec related tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed expectation for origin header test Created 6 years, 10 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/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html
diff --git a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html
similarity index 76%
copy from LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
copy to LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html
index 5d86cfc99350559b2312003c0aa8fb7956b414c8..8e9eb2123877ee869cd4fb7c599a1eff4ec9ccc0 100644
--- a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html
+++ b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html
@@ -1,20 +1,21 @@
<html>
<head>
<script>
- if (window.testRunner)
- testRunner.dumpResourceRequestCallbacks();
</script>
<script src="resources/srcset-helper.js"></script>
<script src="../../resources/js-test.js"></script>
<script>
function updateSrc() {
var img = document.getElementById("foo");
- // srcset must be set first, otherwise 'src' is loaded as well
- img.srcset = "resources/blue-100-px-square.png 1x, resources/green-400-px-square.png 2x";
+ // The below should not trigger the load of the blue image according to the spec, but currently it does
+ // See http://crbug.com/341172
img.src = "resources/blue-100-px-square.png"
+ img.srcset = "resources/blue-100-px-square.png 1x, resources/green-400-px-square.png 2x";
}
addEventListener("DOMContentLoaded", function() {
+ if (window.testRunner && sessionStorage.pageReloaded)
+ testRunner.dumpResourceRequestCallbacks();
updateSrc();
}, false);
addEventListener("load", function() {

Powered by Google App Engine
This is Rietveld 408576698