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
   28
   29
   30
   31

content / test / data / gpu / webgl2-context-blocked.html [blame]

<html>
<head>
<script type="text/javascript">
function send(str) {
  if (window.domAutomationController) {
    window.domAutomationController.send(str);
  } else {
    console.log(str);
  }
}

function onLoad() {
  send("LOADED");
}

function runTest() {
  let canvas = document.getElementById("canvas1");
  let gl = canvas.getContext('webgl2');
  if (gl) {
    send("FAILED");
  } else {
    send("SUCCESS");
  }
}
</script>
</head>
<body onload="onLoad()">
<canvas id="canvas1" width="16px" height="32px">
</canvas>
</body>
</html>