Chromium Code Reviews| 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(); |
|
wibling-chromium
2014/04/01 13:26:09
Can't we wait at the end to ensure we don't exit t
Mads Ager (chromium)
2014/04/01 13:45:38
This is setting a flag in the test runner that thi
|
| + 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> |