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

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x.html

Issue 249353002: Fix srcset selection bug when 'w' and src are present (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@calc
Patch Set: Added assert Created 6 years, 8 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 | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x.html b/LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x.html
index b2d00e0cbedd4c9ef04ba98df5ad0ee8f4ec99bb..2d0c9645a88c4ad43ce0fe20ea0df34e464670e2 100644
--- a/LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x.html
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x.html
@@ -20,6 +20,8 @@
shouldBe('document.getElementById("invalid_length").currentSrc', '"../../hidpi/resources/image-set-2x.png"');
shouldBe('document.getElementById("src_and_w").clientWidth', '700');
shouldBe('document.getElementById("src_and_w").currentSrc', '"resources/image-set-4x.png"');
+ shouldBe('document.getElementById("src_and_w2").clientWidth', '700');
+ shouldBe('document.getElementById("src_and_w2").currentSrc', '"../../hidpi/resources/image-set-1x.png"');
shouldBe('document.getElementById("x_and_w").clientWidth', '700');
shouldBe('document.getElementById("x_and_w").currentSrc', '"resources/image-set-4x.png"');
shouldBe('document.getElementById("x_and_w2").clientWidth', '400');
@@ -43,7 +45,9 @@
<!-- Missing sizes or an invalid one, give a source size of 100vw -->
<img id="default_sizes" src="" srcset="../../hidpi/resources/image-set-1x.png 400w, ../../hidpi/resources/image-set-2x.png 800w, resources/image-set-4x.png 1600w">
<img id="invalid_length" src="" sizes="(max-width: 300px) 400w, 800w" srcset="../../hidpi/resources/image-set-1x.png 400w, ../../hidpi/resources/image-set-2x.png 800w">
+ <!-- Make sure that the img src is not picked when 'w' is present -->
<img id="src_and_w" src="../../hidpi/resources/image-set-1x.png" sizes="700px" srcset="resources/image-set-4x.png 1600w">
+ <img id="src_and_w2" src="../../hidpi/resources/image-set-2x.png" sizes="700px" srcset="../../hidpi/resources/image-set-1x.png 400w">
<img id="x_and_w" sizes="700px" srcset="../../hidpi/resources/image-set-1x.png 0.5x, resources/image-set-4x.png 1600w">
<!-- The 'x' resource should be picked, and 'sizes' have no impact on its intrisic size -->
<img id="x_and_w2" sizes="700px" srcset="../../hidpi/resources/image-set-2x.png 2x, resources/image-set-4x.png 16000w">
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-sizes-1x-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698