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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/context-destroyed-crash.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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="resources/webgl-test.js"></script> 3 <script src="resources/webgl-test.js"></script>
4 <script src="../../../resources/gc.js"></script>
4 </head> 5 </head>
5 <body> 6 <body>
6 <script> 7 <script>
7 if (window.testRunner) { 8 if (window.testRunner) {
8 testRunner.dumpAsText(); 9 testRunner.dumpAsText();
9 testRunner.waitUntilDone(); 10 testRunner.waitUntilDone();
10 } 11 }
11 12
12 function gc()
13 {
14 if (window.GCController)
15 return GCController.collect();
16
17 for (var i = 0; i < 10000; ++i)
18 var s = new String("AAAA");
19 }
20
21 window.onload = function() 13 window.onload = function()
22 { 14 {
23 canvas = document.createElement("canvas"); 15 canvas = document.createElement("canvas");
24 context = create3DContext(canvas); 16 context = create3DContext(canvas);
25 extension = context.getExtension("WEBGL_lose_context"); 17 extension = context.getExtension("WEBGL_lose_context");
26 18
27 canvas = null; 19 canvas = null;
28 context = null; 20 context = null;
29 gc(); 21 gc();
30 22
31 setTimeout(finishTest, 1); 23 setTimeout(finishTest, 1);
32 } 24 }
33 25
34 function finishTest() 26 function finishTest()
35 { 27 {
36 extension.loseContext(); 28 extension.loseContext();
37 29
38 document.body.innerHTML = "PASS"; 30 document.body.innerHTML = "PASS";
39 if (window.testRunner) 31 if (window.testRunner)
40 testRunner.notifyDone(); 32 testRunner.notifyDone();
41 } 33 }
42 </script> 34 </script>
43 </body> 35 </body>
44 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698