diff options
Diffstat (limited to 'dom/browser-element/mochitest/priority/file_WebGLContextLost.html')
-rw-r--r-- | dom/browser-element/mochitest/priority/file_WebGLContextLost.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dom/browser-element/mochitest/priority/file_WebGLContextLost.html b/dom/browser-element/mochitest/priority/file_WebGLContextLost.html new file mode 100644 index 000000000..bd5c84f11 --- /dev/null +++ b/dom/browser-element/mochitest/priority/file_WebGLContextLost.html @@ -0,0 +1,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> |