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

Unified Diff: LayoutTests/svg/animations/smil-leak-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: Fix js-test.js use in test. 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-element-instances.svg
diff --git a/LayoutTests/svg/animations/smil-leak-element-instances.svg b/LayoutTests/svg/animations/smil-leak-element-instances.svg
index 560e41aa39d302c1afaba4b52abe2c459c10755f..2eed6b24794410e3be69697178c24cf25c226509 100644
--- a/LayoutTests/svg/animations/smil-leak-element-instances.svg
+++ b/LayoutTests/svg/animations/smil-leak-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[
@@ -34,22 +35,23 @@ function createAnimatedRectInstance() {
function cleanup() {
// Collect garbage before recording starting live node count, in case there are live elements from previous tests.
- GCController.collectAll();
- 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.collectAll();
+ collectGarbage(function() {
+ // This is 400 instead of 200 as it creates shadow tree elements.
+ var liveDelta = originalLiveElements - internals.numberOfLiveNodes() - 400;
+ if (liveDelta == 0)
+ log("PASS");
+ else
+ log("FAIL: " + liveDelta + " extra live node(s)");
- // This is 400 instead of 200 as it creates shadow tree elements.
- var liveDelta = originalLiveElements - internals.numberOfLiveNodes() - 400;
- if (liveDelta == 0)
- log("PASS");
- else
- log("FAIL: " + liveDelta + " extra live node(s)");
-
- testRunner.notifyDone();
+ testRunner.notifyDone();
+ });
+ });
}
function startTest() {

Powered by Google App Engine
This is Rietveld 408576698