summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/document-softleak-mouse-navigation.html
blob: 91b679632d24ca5d3a8e2b461de9f35f1ffdd895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!doctype html>
<html>
<body>
<iframe id="target"></iframe>
<script src="../../resources/js-test.js"></script>
<script src="../../resources/leak-check.js"></script>
<script>
jsTestIsAsync = true;

var countersBefore;
var iframe = document.getElementById("target");

function onAboutBlankLoad() {
    getCounterValues(function (counters) {
        countersBefore = counters;
        iframe.onload = null;
        iframe.src = "resources/link.html";
    });
}

function onDone() {
    getCounterValues(function (countersAfter) {
        compareValues(countersBefore, countersAfter, {'numberOfLiveDocuments': 0});
        finishJSTest();
    });
}

iframe.onload = onAboutBlankLoad;
iframe.src = "about:blank";
window.addEventListener("message", onDone, false);
</script>
</body>
</html>