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

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-srcset-in-iframe.html

Issue 674163002: Test that only the right resource is loaded in iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-srcset-in-iframe-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/HTMLImageElement/image-srcset-in-iframe.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-srcset-in-iframe.html b/LayoutTests/fast/dom/HTMLImageElement/image-srcset-in-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..c2f332d5d1b8e7208ab9372065805e5d59abd191
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-srcset-in-iframe.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
Mike West 2014/10/24 15:18:26 Can you (perhaps in a future CL?) start migrating
+<script>
+var img;
+var jsTestIsAsync = true;
+
+if (window.internals)
+ internals.evictAllResources();
+
+window.addEventListener("message", function() {
+ if (window.internals) {
+ shouldBeFalse('window.internals.isLoadingFromMemoryCache("resources/image-set-4x.png")');
+ shouldBeTrue('window.internals.isLoadingFromMemoryCache("resources/blue_rect.jpg")');
+ }
+ finishJSTest();
+ });
+</script>
+
+<iframe id="frame" style="width: 80px;"></iframe>
+<script>
+var iframe = document.getElementById('frame');
+var iframeDoc = iframe.contentWindow.document;
+
+iframeDoc.body.innerHTML = '<img id="srcset" srcset="resources/blue_rect.jpg 90w, resources/image-set-4x.png 120w">';
+var img = iframeDoc.getElementById('srcset');
+img.onload = function() {
+ window.parent.postMessage("loaded", "*");
+};
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-srcset-in-iframe-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698