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

Unified Diff: LayoutTests/fast/forms/associatedFormControls-leak-nodes.html

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/fast/forms/associatedFormControls-leak-nodes.html
diff --git a/LayoutTests/fast/forms/associatedFormControls-leak-nodes.html b/LayoutTests/fast/forms/associatedFormControls-leak-nodes.html
index 0b7af5004844caace3842b8de4ca48086b9bbeec..1325d06999a507fd24a726c6466987791caca1ea 100644
--- a/LayoutTests/fast/forms/associatedFormControls-leak-nodes.html
+++ b/LayoutTests/fast/forms/associatedFormControls-leak-nodes.html
@@ -8,19 +8,25 @@
if (!window.internals) {
debug("This test only runs on \"content_shell --dump-render-tree\", as it requires existence of window.internals.");
} else {
- gc();
- var documentsBefore = window.internals.numberOfLiveDocuments();
+ testRunner.waitUntilDone();
+ var documentsBefore;
+ var documentsAfter;
+ collectGarbage(function() {
+ documentsBefore = window.internals.numberOfLiveDocuments();
- var frame = document.getElementById('frame');
- frame.contentDocument.body.innerHTML = '<form></form>';
- document.body.removeChild(frame);
- frame = null;
+ var frame = document.getElementById('frame');
+ frame.contentDocument.body.innerHTML = '<form></form>';
+ document.body.removeChild(frame);
+ frame = null;
- gc();
- var documentsAfter = window.internals.numberOfLiveDocuments();
+ collectGarbage(function() {
+ documentsAfter = window.internals.numberOfLiveDocuments();
- // -1 is from removing frame itself.
- shouldBe('documentsBefore - 1', 'documentsAfter');
+ // -1 is from removing frame itself.
+ shouldBe('documentsBefore - 1', 'documentsAfter');
+ testRunner.notifyDone();
+ });
+ });
}
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698