Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: LayoutTests/svg/animations/smil-leak-dynamically-added-element-instances.svg

Issue 220203005: Oilpan: introduce sticky forcedForTesting flag to ensure that a precise (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698