| Index: LayoutTests/svg/animations/smil-leak-dynamically-added-element-instances.svg
|
| diff --git a/LayoutTests/svg/animations/smil-leak-dynamically-added-element-instances.svg b/LayoutTests/svg/animations/smil-leak-dynamically-added-element-instances.svg
|
| index b7ecf34e878d9526be78392c3239741fe6e33cfa..2d51c4a271f9f794bf5fc6b50643359fbbaed7b7 100644
|
| --- a/LayoutTests/svg/animations/smil-leak-dynamically-added-element-instances.svg
|
| +++ b/LayoutTests/svg/animations/smil-leak-dynamically-added-element-instances.svg
|
| @@ -4,6 +4,7 @@
|
| </defs>
|
| <g id="g"/>
|
| <text x="50" y="50" id="log"/>
|
| +<script xlink:href="../../resources/js-test.js"></script>
|
| <script id="script">
|
| <![CDATA[
|
|
|
| @@ -33,25 +34,23 @@ function createAnimatedRectInstance() {
|
| }
|
|
|
| function cleanup() {
|
| - // Collect garbage before recording starting live node count, in case there are live elements from previous tests.
|
| - // FIXME: Unclear why two calls to collect() are required, see crbug.com/307614
|
| - GCController.collect();
|
| - GCController.collect();
|
| - var originalLiveElements = internals.numberOfLiveNodes();
|
| + collectGarbage(function() {
|
| + var originalLiveElements = internals.numberOfLiveNodes();
|
|
|
| - while (g.hasChildNodes())
|
| - g.removeChild(g.lastChild);
|
| + while (g.hasChildNodes())
|
| + g.removeChild(g.lastChild);
|
|
|
| - GCController.collect();
|
| + collectGarbage(function() {
|
| + // FIXME: Why 400 and not 200?
|
| + var liveDelta = originalLiveElements - internals.numberOfLiveNodes() - 400;
|
| + if (liveDelta == 0)
|
| + log("PASS");
|
| + else
|
| + log("FAIL: " + liveDelta + " extra live node(s)");
|
|
|
| - // FIXME: Why 400 and not 200?
|
| - var liveDelta = originalLiveElements - internals.numberOfLiveNodes() - 400;
|
| - if (liveDelta == 0)
|
| - log("PASS");
|
| - else
|
| - log("FAIL: " + liveDelta + " extra live node(s)");
|
| -
|
| - testRunner.notifyDone();
|
| + testRunner.notifyDone();
|
| + });
|
| + });
|
| }
|
|
|
| function addMoreInstances() {
|
|
|