dom/browser-element/mochitest/priority/file_WebGLContextLost.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <html>
     2 <body>
     3 file_WebGLContextLost.html
     4 <canvas id='canvas'></canvas>
     6 <script>
     7 function runTest()
     8 {
     9   var canvas = document.getElementById('canvas');
    10   canvas.addEventListener('webglcontextlost', function() {
    11     alert('webglcontextlost');
    12   });
    14   var context = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
    15   context.viewport(0, 0, 10, 10);
    16   alert('ready');
    17 }
    19 addEventListener('load', function() { setTimeout(runTest, 0) });
    20 </script>
    21 </body>
    22 </html>

mercurial