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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/loading/resources/image-picture-download-after-shrink-frame.html

Issue 2256533002: Remove MediaQueryList listener from removed HTMLSourceElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <body>
3 <script>
4 var imgLoad = function() {
5 window.parent.postMessage("shrink", "*");
6 }
7
8 var test = function () {
9 var entries = performance.getEntriesByType("resource");
10 var downloadedImages = 0;
11 for (var i = 0; i < entries.length; ++i) {
12 var entry = entries[i];
13 if (entry.name.indexOf("base-image") != -1)
14 ++downloadedImages;
15 }
16 return downloadedImages;
17 }
18
19 window.addEventListener("message", function(msg) {
20 if (msg.data == "test")
21 window.parent.postMessage("test_" + test(), "*");
22 });
23 </script>
24 <picture>
25 <source srcset="base-image1.png" media="(max-width: 200px)">
26 <img id=image src="base-image2.png" onload="imgLoad()">
27 <picture>
28 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698