1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/browser-element/mochitest/priority/file_WebGLContextLost.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +<html> 1.5 +<body> 1.6 +file_WebGLContextLost.html 1.7 +<canvas id='canvas'></canvas> 1.8 + 1.9 +<script> 1.10 +function runTest() 1.11 +{ 1.12 + var canvas = document.getElementById('canvas'); 1.13 + canvas.addEventListener('webglcontextlost', function() { 1.14 + alert('webglcontextlost'); 1.15 + }); 1.16 + 1.17 + var context = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); 1.18 + context.viewport(0, 0, 10, 10); 1.19 + alert('ready'); 1.20 +} 1.21 + 1.22 +addEventListener('load', function() { setTimeout(runTest, 0) }); 1.23 +</script> 1.24 +</body> 1.25 +</html>