OLD | NEW |
1 This test ensures that changing the context does not crash. | 1 <script src="../../resources/testharness.js"></script> |
| 2 <script src="../../resources/testharnessreport.js"></script> |
2 <canvas id="canvas"></canvas><br /> | 3 <canvas id="canvas"></canvas><br /> |
| 4 |
3 <script> | 5 <script> |
4 if (window.testRunner) | 6 test(function(t) { |
5 testRunner.dumpAsText(); | |
6 | 7 |
7 var canvas = document.getElementById("canvas"); | 8 var canvas = document.getElementById("canvas"); |
8 var ctx1 = canvas.getContext("2d"); | 9 var ctx1 = canvas.getContext("2d"); |
9 var ctx2 = canvas.getContext(""); | 10 var ctx2 = canvas.getContext(""); |
10 ctx1.save(); | 11 ctx1.save(); |
11 | |
12 canvas.parentNode.removeChild(canvas); | |
13 | |
14 if (window.GCController) | |
15 GCController.collect(); | |
16 | 12 |
17 ctx1.save(); | 13 canvas.parentNode.removeChild(canvas); |
18 | 14 |
| 15 if (window.GCController) |
| 16 GCController.collect(); |
| 17 |
| 18 ctx1.save(); |
| 19 |
| 20 }, 'This test ensures that changing the context does not crash.'); |
19 </script> | 21 </script> |
| 22 </body> |
OLD | NEW |