gecko-dev/servo/tests/html/test_webgl_context_get_parameter.html
ecoal95 6679e6dff7 servo: Merge #6240 - WebGLRenderingContext getters and getParameter (from emilio:webgl-context-enhancements); r=nox
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.

r? @jdm or @nox?

Source-Repo: https://github.com/servo/servo
Source-Revision: 042737793b1995ad93dc093ea12ec986b99e64b8
2015-06-01 10:20:14 -05:00

12 lines
447 B
HTML

<!doctype html>
<meta charset="utf-8">
<title>WebGLRenderingContext getParameter test</title>
<script>
var gl = document.createElement("canvas").getContext("webgl");
if ( typeof gl.getParameter !== "function" )
console.error("getParameter should be a function");
if ( gl.getParameter(gl.VERSION).indexOf("WebGL 1.0") !== 0 )
console.error("getParameter(VERSION) should return a string beginning with \"WebGL 1.0\"");
</script>