2 <script src=
"../../../resources/js-test.js"></script>
3 <script src=
"resources/currentSrcHelper.js"></script>
7 addEventListener("load", function() {
8 shouldBe('document.getElementById("canary").clientWidth', '75');
9 shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"');
10 shouldNotBe('document.querySelector("#clone img").currentSrc.indexOf("image-set-1x")', '-1');
11 shouldBe('document.querySelector("#clone img").currentSrc.indexOf("blue_rect")', '-1');
12 shouldNotBe('document.querySelector("#import img").currentSrc.indexOf("image-set-1x")', '-1');
13 shouldBe('document.querySelector("#import img").currentSrc.indexOf("blue_rect")', '-1');
17 <!-- A canary image to see that the test is actually working -->
18 <img id=
"canary" src=
"resources/blue_rect.jpg?0">
19 <!-- simple picture construct -->
21 <img src=
"resources/blue_rect.jpg?1" srcset=
"../../hidpi/resources/image-set-1x.png 1x, ../../hidpi/resources/image-set-2x.png 2x">
23 <div id=
"clone"></div>
24 <div id=
"import"></div>
26 var t
= document
.querySelector('template');
28 document
.querySelector('#clone').appendChild(t
.content
.cloneNode(true));
29 document
.querySelector('#import').appendChild(document
.importNode(t
.content
, true));