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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/ValidityState-removed-control.html

Issue 2847943002: Cleanup LayoutTests that define a function gc(). (Closed)
Patch Set: Fixing Layout Tests Failures Created 3 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
OLDNEW
1 <head> 1 <head>
2 2 <script src="../../resources/gc.js"></script>
3 <script> 3 <script>
4 4
5 function gc()
6 {
7 if (window.GCController)
8 return GCController.collect();
9
10 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
11 var s = new String("");
12 }
13 }
14
15 function runTest() 5 function runTest()
16 { 6 {
17 if (window.testRunner) 7 if (window.testRunner)
18 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
19 var validity = document.getElementById("control").validity; 9 var validity = document.getElementById("control").validity;
20 document.body.removeChild(document.getElementById("control")); 10 document.body.removeChild(document.getElementById("control"));
21 gc(); 11 gc();
22 validity.valueMissing; 12 validity.valueMissing;
23 document.getElementById("result").firstChild.data = "Test has run: If no ass ertion or crash occurred, it passed."; 13 document.getElementById("result").firstChild.data = "Test has run: If no ass ertion or crash occurred, it passed.";
24 } 14 }
25 15
26 </script> 16 </script>
27 17
28 </head> 18 </head>
29 19
30 <body onload="runTest()"> 20 <body onload="runTest()">
31 21
32 <p>Tests the behavior of removing a control and then accessing its validity stat e afterward.</p> 22 <p>Tests the behavior of removing a control and then accessing its validity stat e afterward.</p>
33 23
34 <select id="control"></select> 24 <select id="control"></select>
35 25
36 <p id="result">TEST DID NOT RUN YET</p> 26 <p id="result">TEST DID NOT RUN YET</p>
37 27
38 </body> 28 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698