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

Unified Diff: third_party/WebKit/LayoutTests/fast/leak.html

Issue 2805813003: Leak test for crbug.com/707544
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/leak.html
diff --git a/third_party/WebKit/LayoutTests/fast/leak.html b/third_party/WebKit/LayoutTests/fast/leak.html
new file mode 100644
index 0000000000000000000000000000000000000000..926b702842ed0a19021bdd91d93cf78580a6ff90
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/leak.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<head>
+<script src="../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+window.jsTestIsAsync = true;
+description('Untitled test.');
+
+shouldBe('typeof window.internals.observeGC', '"function"', 'this test requires window.internals');
+
+var frag = document.createElement('div');
+let collection = frag.getElementsByTagName('foobar');
+var leakObserver = internals.observeGC(collection);
+collection = null;
+frag = null;
+gc();
+shouldBeTrue("leakObserver.wasCollected");
+finishJSTest();
+</script>
+</body>
+</html>
+
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698