Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / webgl / context-destroyed-crash.html
blob1ec8c42144af7b2a6bfbe9d271eaaebc1d1c3944
1 <html>
2 <head>
3 <script src="resources/webgl-test.js"></script>
4 </head>
5 <body>
6 <script>
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.waitUntilDone();
12 function gc()
14 if (window.GCController)
15 return GCController.collect();
17 for (var i = 0; i < 10000; ++i)
18 var s = new String("AAAA");
21 window.onload = function()
23 canvas = document.createElement("canvas");
24 context = create3DContext(canvas);
25 extension = context.getExtension("WEBGL_lose_context");
27 canvas = null;
28 context = null;
29 gc();
31 setTimeout(finishTest, 1);
34 function finishTest()
36 extension.loseContext();
38 document.body.innerHTML = "PASS";
39 if (window.testRunner)
40 testRunner.notifyDone();
42 </script>
43 </body>
44 </html>