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

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

Issue 290803002: Return an absolute URL for HTMLImageElement.currentSrc (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and review nits Created 6 years, 7 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-picture-1x-expected.txt » ('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> 4 <script>
4 if (window.testRunner) 5 if (window.testRunner)
5 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
6 7
7 addEventListener("load", function() { 8 addEventListener("load", function() {
8 shouldBe('document.getElementById("canary").clientWidth', '75'); 9 shouldBe('document.getElementById("canary").clientWidth', '75');
9 shouldBe('document.getElementById("canary").currentSrc', '"resources/blu e_rect.jpg?0"'); 10 shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"');
10 shouldBe('document.getElementById("simple").clientWidth', '800'); 11 shouldBe('document.getElementById("simple").clientWidth', '800');
11 shouldBe('document.getElementById("simple").currentSrc', '"../../hidpi/r esources/image-set-2x.png?2"'); 12 shouldBe('currentSrcFileName("simple")', '"image-set-2x.png?2"');
12 shouldBe('document.getElementById("multiple").clientWidth', '800'); 13 shouldBe('document.getElementById("multiple").clientWidth', '800');
13 shouldBe('document.getElementById("multiple").currentSrc', '"../../hidpi /resources/image-set-2x.png?2"'); 14 shouldBe('currentSrcFileName("multiple")', '"image-set-2x.png?2"');
14 shouldBe('document.getElementById("other_children").clientWidth', '800') ; 15 shouldBe('document.getElementById("other_children").clientWidth', '800') ;
15 shouldBe('document.getElementById("other_children").currentSrc', '"../.. /hidpi/resources/image-set-2x.png?2"'); 16 shouldBe('currentSrcFileName("other_children")', '"image-set-2x.png?2"') ;
16 shouldBe('document.getElementById("img_before_source").clientWidth', '75 '); 17 shouldBe('document.getElementById("img_before_source").clientWidth', '75 ');
17 shouldBe('document.getElementById("img_before_source").currentSrc', '"re sources/blue_rect.jpg?1"'); 18 shouldBe('currentSrcFileName("img_before_source")', '"blue_rect.jpg?1"') ;
18 shouldBe('document.getElementById("unknown_type").clientWidth', '1600'); 19 shouldBe('document.getElementById("unknown_type").clientWidth', '1600');
19 shouldBe('document.getElementById("unknown_type").currentSrc', '"resourc es/image-set-4x.png?3"'); 20 shouldBe('currentSrcFileName("unknown_type")', '"image-set-4x.png?3"');
20 shouldBe('document.getElementById("empty_srcset").clientWidth', '1600'); 21 shouldBe('document.getElementById("empty_srcset").clientWidth', '1600');
21 shouldBe('document.getElementById("empty_srcset").currentSrc', '"resourc es/image-set-4x.png?3"'); 22 shouldBe('currentSrcFileName("empty_srcset")', '"image-set-4x.png?3"');
22 shouldBe('document.getElementById("no_srcset").clientWidth', '1600'); 23 shouldBe('document.getElementById("no_srcset").clientWidth', '1600');
23 shouldBe('document.getElementById("no_srcset").currentSrc', '"resources/ image-set-4x.png?3"'); 24 shouldBe('currentSrcFileName("no_srcset")', '"image-set-4x.png?3"');
24 }, false); 25 }, false);
25 </script> 26 </script>
26 <!-- A canary image to see that the test is actually working --> 27 <!-- A canary image to see that the test is actually working -->
27 <img id="canary" src="resources/blue_rect.jpg?0"> 28 <img id="canary" src="resources/blue_rect.jpg?0">
28 <!-- simple picture construct --> 29 <!-- simple picture construct -->
29 <picture> 30 <picture>
30 <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, 31 <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,
31 resources/image-set-4x.png?1 1600w"> 32 resources/image-set-4x.png?1 1600w">
32 <source media="(max-width: 800px)" sizes="800px" srcset="../../hidpi/resourc es/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w, 33 <source media="(max-width: 800px)" sizes="800px" srcset="../../hidpi/resourc es/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
33 resources/image-set-4x.png?2 1600w"> 34 resources/image-set-4x.png?2 1600w">
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 </picture> 90 </picture>
90 <!-- source with no srcset - should be ignored --> 91 <!-- source with no srcset - should be ignored -->
91 <picture> 92 <picture>
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, 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,
93 resources/image-set-4x.png?1 1600w"> 94 resources/image-set-4x.png?1 1600w">
94 <source media="(max-width: 800px)" sizes="800px"> 95 <source media="(max-width: 800px)" sizes="800px">
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, 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,
96 resources/image-set-4x.png?3 1600w"> 97 resources/image-set-4x.png?3 1600w">
97 <img id="no_srcset" src="resources/blue_rect.jpg?1"> 98 <img id="no_srcset" src="resources/blue_rect.jpg?1">
98 </picture> 99 </picture>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-picture-1x-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698