Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / minor-dom-gc.html
blob65926550eb5e126b89f934335c1e8711c1c8fbf4
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 jsTestIsAsync = true;
9 function createTree() {
10 var div = document.createElement("div");
11 div.appendChild(document.createElement("div"));
12 div.appendChild(document.createElement("div"));
13 div.appendChild(document.createElement("div"));
16 var num1, num2, num3;
17 asyncGC(function() {
18 num1 = internals.numberOfLiveNodes();
19 createTree();
20 num2 = internals.numberOfLiveNodes();
21 asyncMinorGC(function() {
22 num3 = internals.numberOfLiveNodes();
23 shouldBe('num2', 'num1 + 4');
24 shouldBe('num3', 'num1');
25 finishJSTest();
26 });
27 });
28 </script>
29 </body>
30 </html>