2 <script src=
"../../../resources/js-test.js"></script>
3 <script src=
"resources/currentSrcHelper.js"></script>
6 testRunner
.dumpAsText();
8 addEventListener("load", function() {
9 shouldBe('document.getElementById("canary").clientWidth', '75');
10 shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"');
11 shouldBe('document.getElementById("picture_in_picture").clientWidth', '800');
12 shouldBe('currentSrcFileName("picture_in_picture")', '"image-set-2x.png?2"');
13 shouldBe('document.getElementById("picture_in_div_in_picture").clientWidth', '800');
14 shouldBe('currentSrcFileName("picture_in_div_in_picture")', '"image-set-2x.png?2"');
15 shouldBe('document.getElementById("picture_in_div_with_source_above").clientWidth', '800');
16 shouldBe('currentSrcFileName("picture_in_div_with_source_above")', '"image-set-2x.png?2"');
17 shouldBe('document.getElementById("picture_in_the_way").clientWidth', '800');
18 shouldBe('currentSrcFileName("picture_in_the_way")', '"image-set-2x.png?2"');
19 shouldBe('document.getElementById("picture_in_picture_1").clientWidth', '800');
20 shouldBe('currentSrcFileName("picture_in_picture_1")', '"image-set-2x.png?2"');
21 shouldBe('document.getElementById("picture_in_picture_2").clientWidth', '800');
22 shouldBe('currentSrcFileName("picture_in_picture_2")', '"image-set-2x.png?2"');
23 shouldBe('document.getElementById("picture_at_end").clientWidth', '75');
24 shouldBe('currentSrcFileName("picture_at_end")', '"blue_rect.jpg?52"');
25 shouldBe('document.getElementById("picture_no_source").clientWidth', '75');
26 shouldBe('currentSrcFileName("picture_no_source")', '"blue_rect.jpg?6"');
29 <!-- A canary image to see that the test is actually working -->
30 <img id=
"canary" src=
"resources/blue_rect.jpg?0">
31 <!-- nested element tests -->
34 <source sizes=
"800px" srcset=
"../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
35 resources/image-set-4x.png?2 1600w">
36 <img id=
"picture_in_picture" src=
"resources/blue_rect.jpg?1">
42 <source sizes=
"800px" srcset=
"../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
43 resources/image-set-4x.png?2 1600w">
44 <img id=
"picture_in_div_in_picture" src=
"resources/blue_rect.jpg?2">
49 <source sizes=
"800px" srcset=
"../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
50 resources/image-set-4x.png?2 1600w">
53 <source sizes=
"800px" srcset=
"../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
54 resources/image-set-4x.png?2 1600w">
55 <img id=
"picture_in_div_with_source_above" src=
"resources/blue_rect.jpg?4">
58 <img id=
"picture_in_the_way" src=
"resources/blue_rect.jpg?4">
62 <source sizes=
"800px" srcset=
"../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
63 resources/image-set-4x.png?2 1600w">
64 <img id=
"picture_in_picture_1" src=
"resources/blue_rect.jpg?5">
65 <img id=
"picture_in_picture_2" src=
"resources/blue_rect.jpg?51">
67 <img id=
"picture_at_end" src=
"resources/blue_rect.jpg?52">
70 <img id=
"picture_no_source" src=
"resources/blue_rect.jpg?6">