<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
canvas {
    margin: 20px;
    width: 200px;
    height: 200px;
    padding: 0 0;
}
.border {
    border: 1px solid black;
}
</style>
<script>
if (window.testRunner)
    testRunner.overridePreference("WebKitWebGLEnabled", "1");

function initWebGL()
{
    var canvas = document.getElementById('canvas');
    var gl = canvas.getContext("experimental-webgl", {'antialias': false});
    if (!gl) {
        alert("No WebGL context found");
        return null;
    }

    return gl;
}

var gl = null;

function init()
{
  gl = initWebGL();
  gl.viewport(0, 0, 200, 200);
  gl.clearColor(1, 0, 0, 1); // red
  gl.clear(gl.COLOR_BUFFER_BIT);
  if (window.testRunner) {
      testRunner.display();
      testRunner.dumpAsText(true);
      drawGreen();
  } else
      window.setTimeout(drawGreen, 50);
}

function drawGreen()
{
  gl.clearColor(0, 1, 0, 1); // green
  gl.clear(gl.COLOR_BUFFER_BIT);
  if (window.testRunner) {
      testRunner.display();
      testRunner.display();
  } else
      window.setInterval(function() {
        document.getElementById('canvas').classList.toggle('border');
      }, 50);
}

</script>
</head>
<body onload="init()">
<canvas id="canvas" width="200" height="200"></canvas>
</body>
</html>
