blob: 3fd736c040193d46c3daa8164c467dd818b43a1f [file] [log] [blame]
Torne (Richard Coles)926b0012013-03-28 15:32:48 +00001<!DOCTYPE html>
2
3<p>Test that using mutation observers from the non-main world doesn't leak the document.</p>
4<p>Expected output of this test is LEAK: 28 WebCoreNode</p>
5
6<iframe></iframe>
7
8<script>
9testRunner.dumpAsText();
10testRunner.waitUntilDone();
11
12var iframe = document.querySelector('iframe');
13var count = 0;
14var totalRuns = 5;
15
16iframe.onload = function() {
17 if (count++ < totalRuns) {
18 testRunner.evaluateScriptInIsolatedWorld(1, 'new MutationObserver(function(){}).observe(document, {childList: true, subtree: true});');
19 iframe.srcdoc = "<body><input autofocus></body>";
20 GCController.collect();
21 } else {
22 GCController.collect();
23 testRunner.notifyDone();
24 }
25};
26
27// Need autofocus since evaluateScriptInIsolatedWorld runs in the focused frame.
28iframe.srcdoc = "<body><input autofocus></body>";
29</script>
30