summaryrefslogtreecommitdiffstats
path: root/dom/browser-element/mochitest/priority/file_WebGLContextLost.html
blob: bd5c84f11a189c7fcd1d674fc891d44abe149519 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<body>
file_WebGLContextLost.html
<canvas id='canvas'></canvas>

<script>
function runTest()
{
  var canvas = document.getElementById('canvas');
  canvas.addEventListener('webglcontextlost', function() {
    alert('webglcontextlost');
  });

  var context = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
  context.viewport(0, 0, 10, 10);
  alert('ready');
}

addEventListener('load', function() { setTimeout(runTest, 0) });
</script>
</body>
</html>