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

Side by Side Diff: LayoutTests/fast/hidpi/image-srcset-invalid-descriptor.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: Fixed ASSERT 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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 window.targetScaleFactor = 1; 4 window.targetScaleFactor = 1;
5 </script> 5 </script>
6 <script src="resources/srcset-helper.js"></script> 6 <script src="resources/srcset-helper.js"></script>
7 <script src="../../resources/js-test.js"></script> 7 <script src="../../resources/js-test.js"></script>
8 <script> 8 <script>
9 addEventListener("load", function() { 9 addEventListener("load", function() {
10 shouldBeTrue('document.getElementById("foo").clientWidth==100'); 10 shouldBeTrue('document.getElementById("foo").clientWidth==100');
11 shouldBeTrue('document.getElementById("foo2").clientWidth==200'); 11 shouldBeTrue('document.getElementById("foo2").clientWidth==100');
12 }, false); 12 }, false);
13 </script> 13 </script>
14 </head> 14 </head>
15 15
16 <body id="body"> 16 <body id="body">
17 <div>This test passes if the image below is a 100px blue square when the dev iceScaleFactor is 1.</div> 17 <div>This test passes if the image below is a 100px blue square when the dev iceScaleFactor is 1.</div>
18 <div> It tests that even though the 1x resource contains many invalid descri ptors, 18 <div> It tests that even though the 1x resource contains many invalid descri ptors,
19 only the invalid descriptors are ignored (according to the spec).</div> 19 only the invalid descriptors are ignored (according to the spec).</div>
20 <img id="foo" src="" srcset="resources/blue-100-px-square.png 43q 1x dfs 3dd , resources/green-400-px-square.png 2x"> 20 <img id="foo" src="" srcset="resources/blue-100-px-square.png 43q 1x dfs 3dd , resources/green-400-px-square.png 2x">
21 <img id="foo2" src="" srcset="resources/blue-100-px-square.png 300q, resourc es/green-400-px-square.png 2x"> 21 <img id="foo2" src="" srcset="resources/blue-100-px-square.png 300q, resourc es/green-400-px-square.png 2x">
22 </body> 22 </body>
23 </html> 23 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698