aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html/test_webgl_context_getters.html
blob: a5025f486f0ee0568dfaf52a5cd57037bb1b195a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!doctype html>
<meta charset="utf-8">
<title>WebGLRenderingContext attributes test</title>
<script>
  var canvas = document.createElement('canvas'),
      gl = canvas.getContext('webgl');

  if ( gl.canvas !== canvas )
      console.error("Expected a canvas getter");

  if ( typeof gl.drawingBufferWidth !== "number" ||
       typeof gl.drawingBufferHeight !== "number" )
      console.error("drawingBuffer{Height/Width} should be numbers");
</script>