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

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

Issue 288033018: Add HTMLPictureElement-based source selection to HTMLImageElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix FIXME style 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
(Empty)
1 <html>
esprehn 2014/05/20 06:54:05 ditto
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
7
8 addEventListener("load", function() {
9 shouldBe('document.getElementById("canary").clientWidth', '75');
10 shouldBe('document.getElementById("canary").currentSrc', '"resources/blu e_rect.jpg?0"');
11 shouldBe('document.getElementById("picture_in_picture").clientWidth', '8 00');
12 shouldBe('document.getElementById("picture_in_picture").currentSrc', '". ./../hidpi/resources/image-set-2x.png?2"');
13 shouldBe('document.getElementById("picture_in_div_in_picture").clientWid th', '800');
14 shouldBe('document.getElementById("picture_in_div_in_picture").currentSr c', '"../../hidpi/resources/image-set-2x.png?2"');
15 shouldBe('document.getElementById("picture_in_div_with_source_above").cl ientWidth', '800');
16 shouldBe('document.getElementById("picture_in_div_with_source_above").cu rrentSrc', '"../../hidpi/resources/image-set-2x.png?2"');
17 shouldBe('document.getElementById("picture_in_the_way").clientWidth', '8 00');
18 shouldBe('document.getElementById("picture_in_the_way").currentSrc', '". ./../hidpi/resources/image-set-2x.png?2"');
19 shouldBe('document.getElementById("picture_in_picture_1").clientWidth', '800');
20 shouldBe('document.getElementById("picture_in_picture_1").currentSrc', ' "../../hidpi/resources/image-set-2x.png?2"');
21 shouldBe('document.getElementById("picture_in_picture_2").clientWidth', '800');
22 shouldBe('document.getElementById("picture_in_picture_2").currentSrc', ' "../../hidpi/resources/image-set-2x.png?2"');
23 shouldBe('document.getElementById("picture_at_end").clientWidth', '75');
24 shouldBe('document.getElementById("picture_at_end").currentSrc', '"resou rces/blue_rect.jpg?52"');
25 shouldBe('document.getElementById("picture_no_source").clientWidth', '75 ');
26 shouldBe('document.getElementById("picture_no_source").currentSrc', '"re sources/blue_rect.jpg?6"');
27 }, false);
28 </script>
29 </head>
30
31 <body id="body">
32 <!-- A canary image to see that the test is actually working -->
33 <img id="canary" src="resources/blue_rect.jpg?0">
34 <!-- nested element tests -->
35 <picture>
36 <picture>
37 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x.png ?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
38 resources/image-set-4x.png?2 1600w">
39 <img id="picture_in_picture" src="resources/blue_rect.jpg?1">
40 </picture>
41 </picture>
42 <picture>
43 <div>
44 <picture>
45 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x .png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
46 resources/image-set-4x.png?2 1600w">
47 <img id="picture_in_div_in_picture" src="resources/blue_rect.jpg ?2">
48 </picture>
49 </div>
50 </picture>
51 <picture>
52 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x.png?2 4 00w, ../../hidpi/resources/image-set-2x.png?2 800w,
53 resources/image-set-4x.png?2 1600w">
54 <div>
55 <picture>
56 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x .png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
57 resources/image-set-4x.png?2 1600w">
58 <img id="picture_in_div_with_source_above" src="resources/blue_r ect.jpg?4">
59 </picture>
60 </div>
61 <img id="picture_in_the_way" src="resources/blue_rect.jpg?4">
62 </picture>
63 <picture>
64 <picture>
65 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x.png ?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
66 resources/image-set-4x.png?2 1600w">
67 <img id="picture_in_picture_1" src="resources/blue_rect.jpg?5">
68 <img id="picture_in_picture_2" src="resources/blue_rect.jpg?51">
69 </picture>
70 <img id="picture_at_end" src="resources/blue_rect.jpg?52">
71 </picture>
72 <picture>
73 <img id="picture_no_source" src="resources/blue_rect.jpg?6">
74 </picture>
75 </body>
76 </html>
77
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698