1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27

content / test / data / gpu / functional_webgl_disabled_extension.html [blame]

<html>
<script type="text/javascript">
function runTest() {
  var canvas = document.getElementById("glcanvas");
  var gl = canvas.getContext('webgl');
  if (!gl) {
    if (window.domAutomationController) {
      window.domAutomationController.send("FAILED");
    } else {
      alert("Unable to initialize WebGL");
    }
    return;
  }
  // This extension is supposed to be disabled via a blocklist entry.
  if (gl.getExtension('WEBGL_lose_context')) {
    window.domAutomationController.send("FAILED");
  } else {
    window.domAutomationController.send("SUCCESS");
  }
}
</script>
<body onload="runTest()">
  <canvas id="glcanvas" width="640" height="480">
    Your browser doesn't appear to support the HTML5 <code><canvas></code> element.
  </canvas>
</body>
</html>