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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/associatedFormControls-leak-nodes.html

Issue 1965753002: Try running GC twice to fix flaky associatedFormControls-leak-nodes.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <iframe id="frame"></iframe> 4 <iframe id="frame"></iframe>
5 5
6 <script src="../../resources/js-test.js"></script> 6 <script src="../../resources/js-test.js"></script>
7 <script> 7 <script>
8 if (!window.internals) { 8 if (!window.internals) {
9 debug("This test only runs on \"content_shell --run-layout-test\", as it req uires existence of window.internals."); 9 debug("This test only runs on \"content_shell --run-layout-test\", as it req uires existence of window.internals.");
10 } else { 10 } else {
11 testRunner.waitUntilDone(); 11 testRunner.waitUntilDone();
12 window.jsTestIsAsync = true; 12 window.jsTestIsAsync = true;
13 var documentsBefore; 13 var documentsBefore;
14 var documentsAfter; 14 var documentsAfter;
15 // FIXME(keishi): Calling asyncGC twice to fix flakiness.
15 asyncGC(function() { 16 asyncGC(function() {
16 documentsBefore = window.internals.numberOfLiveDocuments(); 17 asyncGC(function() {
18 documentsBefore = window.internals.numberOfLiveDocuments();
17 19
18 var frame = document.getElementById('frame'); 20 var frame = document.getElementById('frame');
19 frame.contentDocument.body.innerHTML = '<form></form>'; 21 frame.contentDocument.body.innerHTML = '<form></form>';
20 document.body.removeChild(frame); 22 document.body.removeChild(frame);
21 frame = null; 23 frame = null;
22 24
23 asyncGC(function() { 25 asyncGC(function() {
24 documentsAfter = window.internals.numberOfLiveDocuments(); 26 documentsAfter = window.internals.numberOfLiveDocuments();
25 27
26 // -1 is from removing frame itself. 28 // -1 is from removing frame itself.
27 shouldBe('documentsBefore - 1', 'documentsAfter'); 29 shouldBe('documentsBefore - 1', 'documentsAfter');
28 finishJSTest(); 30 finishJSTest();
31 });
29 }); 32 });
30 }); 33 });
31 } 34 }
32 </script> 35 </script>
33 </body> 36 </body>
34 </html> 37 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698