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

Side by Side Diff: LayoutTests/fast/dom/HTMLImageElement/image-picture-invalid.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
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("div_end_picture").clientWidth', '800' ); 11 shouldBe('document.getElementById("div_end_picture").clientWidth', '800' );
11 shouldBe('document.getElementById("div_end_picture").currentSrc', '"../. ./hidpi/resources/image-set-2x.png?2"'); 12 shouldBe('currentSrcFileName("div_end_picture")', '"image-set-2x.png?2"' );
12 shouldBe('document.getElementById("div_multiple_end").clientWidth', '800 '); 13 shouldBe('document.getElementById("div_multiple_end").clientWidth', '800 ');
13 shouldBe('document.getElementById("div_multiple_end").currentSrc', '"../ ../hidpi/resources/image-set-2x.png?2"'); 14 shouldBe('currentSrcFileName("div_multiple_end")', '"image-set-2x.png?2" ');
14 shouldBe('document.getElementById("source_in_div").clientWidth', '75'); 15 shouldBe('document.getElementById("source_in_div").clientWidth', '75');
15 shouldBe('document.getElementById("source_in_div").currentSrc', '"resour ces/blue_rect.jpg"'); 16 shouldBe('currentSrcFileName("source_in_div")', '"blue_rect.jpg"');
16 shouldBe('document.getElementById("not_in_picture").clientWidth', '75'); 17 shouldBe('document.getElementById("not_in_picture").clientWidth', '75');
17 shouldBe('document.getElementById("not_in_picture").currentSrc', '"resou rces/blue_rect.jpg"'); 18 shouldBe('currentSrcFileName("not_in_picture")', '"blue_rect.jpg"');
18 }, false); 19 }, false);
19 </script> 20 </script>
20 <!-- A canary image to see that the test is actually working --> 21 <!-- A canary image to see that the test is actually working -->
21 <img id="canary" src="resources/blue_rect.jpg?0"> 22 <img id="canary" src="resources/blue_rect.jpg?0">
22 <!-- Invalid nesting tests --> 23 <!-- Invalid nesting tests -->
23 <!-- In the following tests, nesting shouldn't mess up the selection algorithm - -> 24 <!-- In the following tests, nesting shouldn't mess up the selection algorithm - ->
24 <picture> 25 <picture>
25 <picture> 26 <picture>
26 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x.png?2 4 00w, ../../hidpi/resources/image-set-2x.png?2 800w, 27 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x.png?2 4 00w, ../../hidpi/resources/image-set-2x.png?2 800w,
27 resources/image-set-4x.png?2 1600w"> 28 resources/image-set-4x.png?2 1600w">
(...skipping 27 matching lines...) Expand all
55 <picture> 56 <picture>
56 <div> 57 <div>
57 <picture> 58 <picture>
58 <div> 59 <div>
59 <source sizes="400px" srcset="resources/base-image1.png?5 200w, resources/base-image3.png?5 400w, resources/base-image2.png?5 800w"> 60 <source sizes="400px" srcset="resources/base-image1.png?5 200w, resources/base-image3.png?5 400w, resources/base-image2.png?5 800w">
60 <img id="not_in_picture" src="resources/blue_rect.jpg"> 61 <img id="not_in_picture" src="resources/blue_rect.jpg">
61 </div> 62 </div>
62 </picture> 63 </picture>
63 </div> 64 </div>
64 </picture> 65 </picture>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698