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

Side by Side 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, 8 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/OilpanExpectations ('k') | LayoutTests/resources/js-test.js » ('j') | 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 --dump-render-tree\", as it re quires existence of window.internals."); 9 debug("This test only runs on \"content_shell --dump-render-tree\", as it re quires existence of window.internals.");
10 } else { 10 } else {
11 gc(); 11 testRunner.waitUntilDone();
12 var documentsBefore = window.internals.numberOfLiveDocuments(); 12 window.jsTestIsAsync = true;
13 var documentsBefore;
14 var documentsAfter;
15 collectGarbage(function() {
16 documentsBefore = window.internals.numberOfLiveDocuments();
13 17
14 var frame = document.getElementById('frame'); 18 var frame = document.getElementById('frame');
15 frame.contentDocument.body.innerHTML = '<form></form>'; 19 frame.contentDocument.body.innerHTML = '<form></form>';
16 document.body.removeChild(frame); 20 document.body.removeChild(frame);
17 frame = null; 21 frame = null;
18 22
19 gc(); 23 collectGarbage(function() {
20 var documentsAfter = window.internals.numberOfLiveDocuments(); 24 documentsAfter = window.internals.numberOfLiveDocuments();
21 25
22 // -1 is from removing frame itself. 26 // -1 is from removing frame itself.
23 shouldBe('documentsBefore - 1', 'documentsAfter'); 27 shouldBe('documentsBefore - 1', 'documentsAfter');
28 finishJSTest();
29 });
30 });
24 } 31 }
25 </script> 32 </script>
26 </body> 33 </body>
27 </html> 34 </html>
OLDNEW
« 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