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

Unified Diff: LayoutTests/fast/media/media-query-listener-gc.html

Issue 397403002: Make MediaQueryList an ActiveDOMElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: need ActiveDOMObject in IDL Created 6 years, 5 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/media/media-query-listener-gc-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/media/media-query-listener-gc.html
diff --git a/LayoutTests/fast/media/media-query-list-listener-ordering.html b/LayoutTests/fast/media/media-query-listener-gc.html
similarity index 59%
copy from LayoutTests/fast/media/media-query-list-listener-ordering.html
copy to LayoutTests/fast/media/media-query-listener-gc.html
index 2cc95a7d12d70e89ac63f1ce0141a8da0b36decb..5c749d2c26d819bda927f13177c32c33e0318fac 100644
--- a/LayoutTests/fast/media/media-query-list-listener-ordering.html
+++ b/LayoutTests/fast/media/media-query-listener-gc.html
@@ -4,7 +4,7 @@
<div id="sandbox"></div>
<script>
- description("Media query listeners should fire grouped by the MediaQueryList.");
+ description("Media query listeners should work even after gc.");
var jsTestIsAsync = true;
var sandbox = document.getElementById("sandbox");
@@ -13,8 +13,6 @@
var matchMedia = iframe.contentWindow.matchMedia;
var mediaList1 = matchMedia("(max-width: 100px)");
- var mediaList2 = matchMedia("(max-width: 100px)");
- var mediaList3 = matchMedia("(max-width: 100px)");
var listenersCalled = [];
@@ -22,17 +20,16 @@
return function() { listenersCalled.push(label); };
}
- mediaList3.addListener(makeListener("mediaList3_1"));
- mediaList2.addListener(makeListener("mediaList2_1"));
mediaList1.addListener(makeListener("mediaList1_1"));
- mediaList2.addListener(makeListener("mediaList2_2"));
- mediaList3.addListener(verifyResult);
-
+ mediaList1.addListener(verifyResult);
+ mediaList1 = null;
+ gc();
iframe.style.width = "200px";
- var expectedResult = ["mediaList1_1", "mediaList2_1", "mediaList2_2", "mediaList3_1"];
+ var expectedResult = ["mediaList1_1"];
function verifyResult() {
shouldBe("listenersCalled", "expectedResult");
finishJSTest();
}
</script>
+
« no previous file with comments | « no previous file | LayoutTests/fast/media/media-query-listener-gc-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698