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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal.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 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script>
5 var t = async_test('Make sure that source based image resources are not down loaded after the img is removed from the DOM.');
6 </script>
7 <iframe id=frame src="resources/image-picture-no-download-after-removal-frame.ht ml" width="700px"></iframe>
8 <script>
9 window.addEventListener("message", t.step_func(function(msg) {
10 if (msg.data == "shrink") {
11 document.getElementsByTagName("iframe")[0].width = "150px";
12 } else if (msg.data.indexOf("test_") != -1) {
13 assert_equals(msg.data, "test_1");
14 t.done();
15 }
16 }));
17
18 // Since we want to see that a new resource wasn't downloaded, the only way is a timeout.
19 setTimeout(t.step_func(function() {
20 document.getElementById("frame").contentWindow.postMessage("test", "*");
21 }), 500);
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698