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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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