summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas/change-context.html
blob: 57970d82410849563c6a3abff0357fb7d816433b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
This test ensures that changing the context does not crash.
<canvas id="canvas"></canvas><br />
<script>
if (window.layoutTestController)
    layoutTestController.dumpAsText();

var canvas = document.getElementById("canvas");
var ctx1 = canvas.getContext("2d");
var ctx2 = canvas.getContext("");
ctx1.save();

canvas.parentNode.removeChild(canvas);

if (window.GCController)
    GCController.collect();
    
ctx1.save();

</script>