Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLImageElement / image-srcset-in-iframe.html
blobc2f332d5d1b8e7208ab9372065805e5d59abd191
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
4 var img;
5 var jsTestIsAsync = true;
7 if (window.internals)
8 internals.evictAllResources();
10 window.addEventListener("message", function() {
11 if (window.internals) {
12 shouldBeFalse('window.internals.isLoadingFromMemoryCache("resources/image-set-4x.png")');
13 shouldBeTrue('window.internals.isLoadingFromMemoryCache("resources/blue_rect.jpg")');
15 finishJSTest();
16 });
17 </script>
19 <iframe id="frame" style="width: 80px;"></iframe>
20 <script>
21 var iframe = document.getElementById('frame');
22 var iframeDoc = iframe.contentWindow.document;
24 iframeDoc.body.innerHTML = '<img id="srcset" srcset="resources/blue_rect.jpg 90w, resources/image-set-4x.png 120w">';
25 var img = iframeDoc.getElementById('srcset');
26 img.onload = function() {
27 window.parent.postMessage("loaded", "*");
29 </script>