blob: 2db4f80d438a7b103eafda2dd8f01e01d1452525 (
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
|
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>
description('Tests that we do not hold on to any nodes');
jsTestIsAsync = true;
function numberOfLiveNodes() {
return window.internals && window.internals.numberOfLiveNodes && window.internals.numberOfLiveNodes();
}
var afterCount;
var beforeCount;
asyncGC(function() {
beforeCount = numberOfLiveNodes();
var f = document.createElement('form');
var i = f.appendChild(document.createElement('input'));
i.setAttribute('onclick', '');
f.removeChild(i);
f = null;
i = null;
asyncGC(function() {
afterCount = numberOfLiveNodes();
shouldBe('afterCount - beforeCount', '0');
finishJSTest();
});
});
</script>
|