Commit 4584158c authored by kouhei's avatar kouhei Committed by Commit bot

Remove node count checks from fast/dom/gc-dom-tree-lifetime.html

Before this CL, the test result depended on synchronous gc() call
which was non-determistic after Oilpan.
This CL removes the node count check to make the test runs deterministic.

This change is safe, as the leak checks are now ensured by Blink Leak Detector,
which supports Oilpan.

BUG=606649

Review-Url: https://codereview.chromium.org/2025773002
Cr-Commit-Position: refs/heads/master@{#396774}
parent f85d3c17
......@@ -30,7 +30,6 @@ PASS globalDiv.id is "div2"
PASS globalDiv.parentNode.id is "div2-parent"
PASS globalDiv.firstChild.id is "div2-child"
=== After clearing innerHTML, divX, divY and divZ ===
PASS All <div> objects in a DOM tree are successfully destructed.
=== Initial state ===
PASS globalDiv.id is "div0"
PASS globalDiv.parentNode.id is "div0-parent"
......@@ -63,7 +62,6 @@ PASS globalDiv.id is "div1"
PASS globalDiv.parentNode.id is "div1-parent"
PASS globalDiv.firstChild.id is "div1-child"
=== After clearing innerHTML, divX, divY and divZ ===
PASS All <div> objects in a DOM tree are successfully destructed.
=== Initial state ===
PASS globalDiv.id is "div1"
PASS globalDiv.parentNode.id is "div1-parent"
......@@ -96,7 +94,6 @@ PASS globalDiv.id is "div2"
PASS globalDiv.parentNode.id is "div2-parent"
PASS globalDiv.firstChild.id is "div2-child"
=== After clearing innerHTML, divX, divY and divZ ===
PASS All <div> objects in a DOM tree are successfully destructed.
=== Initial state ===
PASS globalDiv.id is "div1"
PASS globalDiv.parentNode.id is "div1-parent"
......@@ -129,7 +126,6 @@ PASS globalDiv.id is "div0"
PASS globalDiv.parentNode.id is "div0-parent"
PASS globalDiv.firstChild.id is "div0-child"
=== After clearing innerHTML, divX, divY and divZ ===
PASS All <div> objects in a DOM tree are successfully destructed.
=== Initial state ===
PASS globalDiv.id is "div2"
PASS globalDiv.parentNode.id is "div2-parent"
......@@ -162,7 +158,6 @@ PASS globalDiv.id is "div1"
PASS globalDiv.parentNode.id is "div1-parent"
PASS globalDiv.firstChild.id is "div1-child"
=== After clearing innerHTML, divX, divY and divZ ===
PASS All <div> objects in a DOM tree are successfully destructed.
=== Initial state ===
PASS globalDiv.id is "div2"
PASS globalDiv.parentNode.id is "div2-parent"
......@@ -195,7 +190,6 @@ PASS globalDiv.id is "div0"
PASS globalDiv.parentNode.id is "div0-parent"
PASS globalDiv.firstChild.id is "div0-child"
=== After clearing innerHTML, divX, divY and divZ ===
PASS All <div> objects in a DOM tree are successfully destructed.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -64,22 +64,11 @@ testCases.forEach(function (test) {
divX = document.getElementById(test[0]);
divY = document.getElementById(test[1]);
divZ = document.getElementById(test[2]);
if (window.internals)
prevNodes = window.internals.numberOfLiveNodes();
rootDiv.innerHTML = "";
divX = null;
divY = null;
divZ = null;
gc();
if (window.internals) {
// If all the Node objects in testHtml are successfully destructed,
// at least 9 <div>s objects will be removed.
// (Actually, since testHtml rendering requires more than 9 Node objects.)
if (window.internals.numberOfLiveNodes() <= prevNodes - 9)
testPassed("All <div> objects in a DOM tree are successfully destructed.");
else
testFailed("<div> objects in a DOM tree are not destructed.");
}
});
function checkParentAndChildAlive(div, name) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment