diff --git a/tests/canvas-3d-standard/config.yml b/tests/canvas-3d-standard/config.yml new file mode 100644 index 0000000..532959b --- /dev/null +++ b/tests/canvas-3d-standard/config.yml @@ -0,0 +1,4 @@ +--- + r: 2 + spec: "https://www.khronos.org/registry/webgl/specs/latest/" + title: "Canvas 3D, Standard" diff --git a/tests/canvas-3d-standard/test.js b/tests/canvas-3d-standard/test.js new file mode 100644 index 0000000..2f92f65 --- /dev/null +++ b/tests/canvas-3d-standard/test.js @@ -0,0 +1,20 @@ +test("Canvas 3D Context, standard", function() { + var canvas = document.createElement("canvas"), + contexts = [ + "3d", "webgl", "experimental-webgl", + "moz-webgl", "webkit-3d", "opera-3d", "ms-webgl", "ms-3d" + ], + which, + context; + + while ( contexts.length ) { + which = contexts.pop(); + context = canvas.getContext( which ); + + if ( context ) { + break; + } + } + + assert( which === "webgl", "webgl standard, supported" ); +});