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

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: 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
« no previous file with comments | « LayoutTests/OilpanExpectations ('k') | LayoutTests/resources/js-test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ac7a02cb5245fdc2e1e267bebc97d8f65f4a1b6d 100644
--- a/LayoutTests/fast/forms/associatedFormControls-leak-nodes.html
+++ b/LayoutTests/fast/forms/associatedFormControls-leak-nodes.html
@@ -8,19 +8,26 @@
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();
+ window.jsTestIsAsync = true;
+ 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');
+ finishJSTest();
+ });
+ });
}
</script>
</body>
« no previous file with comments | « LayoutTests/OilpanExpectations ('k') | LayoutTests/resources/js-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698