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

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

Issue 293423002: Refactor srcset parser to align it with spec changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments 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 unified diff | Download patch
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 shouldBe('document.getElementById("canary").clientWidth', '75'); 9 shouldBe('document.getElementById("canary").clientWidth', '75');
10 shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"'); 10 shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"');
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 <source media="(max-width: 800px)" type="image/jp2" sizes="800px" srcset=".. /../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x. png?2 800w, 75 <source media="(max-width: 800px)" type="image/jp2" sizes="800px" srcset=".. /../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x. png?2 800w,
76 resources/image-set-4x.png?2 1600w"> 76 resources/image-set-4x.png?2 1600w">
77 <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resou rces/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w, 77 <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resou rces/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w,
78 resources/image-set-4x.png?3 1600w"> 78 resources/image-set-4x.png?3 1600w">
79 <img id="unknown_type" src="resources/blue_rect.jpg?1"> 79 <img id="unknown_type" src="resources/blue_rect.jpg?1">
80 </picture> 80 </picture>
81 <!-- source with empty srcset - should be ignored --> 81 <!-- source with empty srcset - should be ignored -->
82 <picture> 82 <picture>
83 <source media="(max-width: 400px)" sizes="400px" srcset="../../hidpi/resourc es/image-set-1x.png?1 400w, ../../hidpi/resources/image-set-2x.png?1 800w, 83 <source media="(max-width: 400px)" sizes="400px" srcset="../../hidpi/resourc es/image-set-1x.png?1 400w, ../../hidpi/resources/image-set-2x.png?1 800w,
84 resources/image-set-4x.png?1 1600w"> 84 resources/image-set-4x.png?1 1600w">
85 <source media="(max-width: 800px)" sizes="800px" srcset="../../hidpi/resourc es/image-set-1x.png?2 400r, ../../hidpi/resources/image-set-2x.png?2 800r, 85 <source media="(max-width: 800px)" sizes="800px" srcset=", , ">
86 resources/image-set-4x.png?2 1600r">
87 <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resou rces/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w, 86 <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resou rces/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w,
88 resources/image-set-4x.png?3 1600w"> 87 resources/image-set-4x.png?3 1600w">
89 <img id="empty_srcset" src="resources/blue_rect.jpg?1"> 88 <img id="empty_srcset" src="resources/blue_rect.jpg?1">
90 </picture> 89 </picture>
91 <!-- source with no srcset - should be ignored --> 90 <!-- source with no srcset - should be ignored -->
92 <picture> 91 <picture>
93 <source media="(max-width: 400px)" sizes="400px" srcset="../../hidpi/resourc es/image-set-1x.png?1 400w, ../../hidpi/resources/image-set-2x.png?1 800w, 92 <source media="(max-width: 400px)" sizes="400px" srcset="../../hidpi/resourc es/image-set-1x.png?1 400w, ../../hidpi/resources/image-set-2x.png?1 800w,
94 resources/image-set-4x.png?1 1600w"> 93 resources/image-set-4x.png?1 1600w">
95 <source media="(max-width: 800px)" sizes="800px"> 94 <source media="(max-width: 800px)" sizes="800px">
96 <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resou rces/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w, 95 <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resou rces/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w,
97 resources/image-set-4x.png?3 1600w"> 96 resources/image-set-4x.png?3 1600w">
98 <img id="no_srcset" src="resources/blue_rect.jpg?1"> 97 <img id="no_srcset" src="resources/blue_rect.jpg?1">
99 </picture> 98 </picture>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/hidpi/image-srcset-invalid-descriptor.html » ('j') | Source/core/html/parser/HTMLParserIdioms.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698