Skip to content

Loading…

Adding canvas-3d-standard test. #55

Open
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 10, 2012
  1. @mattwkelly
Showing with 24 additions and 0 deletions.
  1. +4 −0 tests/canvas-3d-standard/config.yml
  2. +20 −0 tests/canvas-3d-standard/test.js
View
4 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"
View
20 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" );
+});
Something went wrong with that request. Please try again.