Home | History | Annotate | Download | only in raw
      1 <!DOCTYPE html>
      2 <!-- saved from url=(0057)http://www.corp.google.com/~vollick/timing-functions.html -->
      3 <html>
      4 <head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      5 
      6 <script type="text/javascript">
      7     // Check for WebGL Support.
      8     function supportsWebGL() {
      9         var canvas = document.createElement('canvas');
     10         gl = canvas.getContext("webgl");
     11         return !!gl;
     12     }
     13 
     14     // Pass the WebGL harness calls through to the native app.
     15     webglTestHarness = {
     16         notifyFinished: function() {
     17             WebGLCallback.notifyFinished();
     18         },
     19         reportResults: function(type, success, msg) {
     20             WebGLCallback.reportResults(type, success, msg);
     21         }
     22     }
     23     function navigateToTest() {
     24         if (supportsWebGL())
     25             window.open(WebGLCallback.getUrlToTest(), "TestFrame");
     26         else
     27             WebGLCallback.notifyFinished();
     28     }
     29     window.addEventListener('load', navigateToTest, false);
     30 </script>
     31 
     32 <style type="text/css">
     33 body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; }
     34 #content { position:absolute; left: 0; right: 0; bottom: 0; top: 0px; }
     35 </style>
     36 
     37 </head>
     38 
     39 <body>
     40   <div id="content">
     41     <iframe name="TestFrame" width="100%" height="100%" frameborder="0"/>
     42   </div>
     43 </body>
     44 </html>
     45