Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLImageElement / image-picture-in-template.html
blob710df7f78c749c2cda04e0a3f8a372aefe53be0b
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script src="resources/currentSrcHelper.js"></script>
4 <script>
5 jsTestIsAsync = true;
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-2x")', '-1');
11 shouldBe('document.querySelector("#clone img").currentSrc.indexOf("blue_rect")', '-1');
12 shouldNotBe('document.querySelector("#import img").currentSrc.indexOf("image-set-2x")', '-1');
13 shouldBe('document.querySelector("#import img").currentSrc.indexOf("blue_rect")', '-1');
14 finishJSTest();
15 }, false);
16 </script>
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 -->
20 <template>
21 <picture>
22 <source media="(max-width: 400px)" sizes="400px" srcset="../../hidpi/resources/image-set-1x.png?1 400w, ../../hidpi/resources/image-set-2x.png?1 800w,
23 resources/image-set-4x.png?1 1600w">
24 <source media="(max-width: 800px)" sizes="800px" srcset="../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
25 resources/image-set-4x.png?2 1600w">
26 <source media="(max-width: 1600px)" sizes="1600px" srcset="../../hidpi/resources/image-set-1x.png?3 400w, ../../hidpi/resources/image-set-2x.png?3 800w,
27 resources/image-set-4x.png?3 1600w">
28 <img src="resources/blue_rect.jpg?1">
29 </picture>
30 </template>
31 <div id="clone"></div>
32 <div id="import"></div>
33 <script>
34 var t = document.querySelector('template');
36 document.querySelector('#clone').appendChild(t.content.cloneNode(true));
37 document.querySelector('#import').appendChild(document.importNode(t.content, true));
38 </script>