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

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

Issue 667763004: Srcset resource selection use a geometric mean to determine resource. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review nits Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <script src="resources/currentSrcHelper.js"></script> 3 <script src="resources/currentSrcHelper.js"></script>
4 <script> 4 <script>
5 if (window.testRunner) 5 if (window.testRunner)
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 7
8 addEventListener("load", function() { 8 addEventListener("load", function() {
9 shouldBeTrue('document.getElementById("simple").currentSrc.indexOf("file ://") == 0'); 9 shouldBeTrue('document.getElementById("simple").currentSrc.indexOf("file ://") == 0');
10 shouldBe('document.getElementById("simple").clientWidth', '(window.inner Width)'); 10 shouldBe('document.getElementById("simple").clientWidth', '(window.inner Width)');
(...skipping 29 matching lines...) Expand all
40 <img id="small_sizes" src="" sizes="300px" srcset="../../hidpi/resources/image-s et-1x.png 400w, ../../hidpi/resources/image-set-2x.png 800w"> 40 <img id="small_sizes" src="" sizes="300px" srcset="../../hidpi/resources/image-s et-1x.png 400w, ../../hidpi/resources/image-set-2x.png 800w">
41 <!-- 'sizes' has no impact on 'x' or 'src' resources --> 41 <!-- 'sizes' has no impact on 'x' or 'src' resources -->
42 <img id="sizes_x_descriptors" src="" sizes="50vw" srcset="../../hidpi/resources/ image-set-1x.png 1x, ../../hidpi/resources/image-set-2x.png 2x"> 42 <img id="sizes_x_descriptors" src="" sizes="50vw" srcset="../../hidpi/resources/ image-set-1x.png 1x, ../../hidpi/resources/image-set-2x.png 2x">
43 <img id="sizes_src" src="../../hidpi/resources/image-set-1x.png" sizes="50vw"> 43 <img id="sizes_src" src="../../hidpi/resources/image-set-1x.png" sizes="50vw">
44 <!-- Missing sizes or an invalid one, give a source size of 100vw --> 44 <!-- Missing sizes or an invalid one, give a source size of 100vw -->
45 <img id="default_sizes" src="" srcset="../../hidpi/resources/image-set-1x.png 40 0w, ../../hidpi/resources/image-set-2x.png 800w, resources/image-set-4x.png 1600 w"> 45 <img id="default_sizes" src="" srcset="../../hidpi/resources/image-set-1x.png 40 0w, ../../hidpi/resources/image-set-2x.png 800w, resources/image-set-4x.png 1600 w">
46 <img id="invalid_length" src="" sizes="(max-width: 300px) 400w, 800w" srcset=".. /../hidpi/resources/image-set-1x.png 400w, ../../hidpi/resources/image-set-2x.pn g 800w"> 46 <img id="invalid_length" src="" sizes="(max-width: 300px) 400w, 800w" srcset=".. /../hidpi/resources/image-set-1x.png 400w, ../../hidpi/resources/image-set-2x.pn g 800w">
47 <!-- Make sure that the img src is not picked when 'w' is present --> 47 <!-- Make sure that the img src is not picked when 'w' is present -->
48 <img id="src_and_w" src="../../hidpi/resources/image-set-1x.png" sizes="700px" s rcset="resources/image-set-4x.png 1600w"> 48 <img id="src_and_w" src="../../hidpi/resources/image-set-1x.png" sizes="700px" s rcset="resources/image-set-4x.png 1600w">
49 <img id="src_and_w2" src="../../hidpi/resources/image-set-2x.png" sizes="700px" srcset="../../hidpi/resources/image-set-1x.png 400w"> 49 <img id="src_and_w2" src="../../hidpi/resources/image-set-2x.png" sizes="700px" srcset="../../hidpi/resources/image-set-1x.png 400w">
50 <img id="x_and_w" sizes="700px" srcset="../../hidpi/resources/image-set-1x.png 0 .5x, resources/image-set-4x.png 1600w"> 50 <img id="x_and_w" sizes="700px" srcset="../../hidpi/resources/image-set-1x.png 0 .4x, resources/image-set-4x.png 1600w">
51 <!-- The 'x' resource should be picked, and 'sizes' have no impact on its intris ic size --> 51 <!-- The 'x' resource should be picked, and 'sizes' have no impact on its intris ic size -->
52 <img id="x_and_w2" sizes="700px" srcset="../../hidpi/resources/image-set-2x.png 2x, resources/image-set-4x.png 16000w"> 52 <img id="x_and_w2" sizes="700px" srcset="../../hidpi/resources/image-set-2x.png 2x, resources/image-set-4x.png 16000w">
53 <img id="x_and_w3" sizes="700px" srcset="resources/image-set-4x.png 16000w, ../. ./hidpi/resources/image-set-2x.png 2x"> 53 <img id="x_and_w3" sizes="700px" srcset="resources/image-set-4x.png 16000w, ../. ./hidpi/resources/image-set-2x.png 2x">
54 <!-- The intrinsic size should be identical to the 'sizes' value --> 54 <!-- The intrinsic size should be identical to the 'sizes' value -->
55 <img id="half_size" sizes="50vw" srcset="../../hidpi/resources/image-set-2x.png 800w, resources/image-set-4x.png 16000w"> 55 <img id="half_size" sizes="50vw" srcset="../../hidpi/resources/image-set-2x.png 800w, resources/image-set-4x.png 16000w">
56 <img id="infitisimal_sizes" sizes="1vw" srcset="../../hidpi/resources/image-set- 2x.png 800w, resources/image-set-4x.png 16000w"> 56 <img id="infitisimal_sizes" sizes="1vw" srcset="../../hidpi/resources/image-set- 2x.png 800w, resources/image-set-4x.png 16000w">
57 <img id="fraction" sizes="0.5px" srcset="data:,a 1w, data:,b 2x"> 57 <img id="fraction" sizes="0.5px" srcset="data:,a 1w, data:,b 2x">
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-srcset-react-to-media-changes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698