Index: third_party/WebKit/LayoutTests/vr/resources/presentation-setup.js |
diff --git a/third_party/WebKit/LayoutTests/vr/resources/presentation-setup.js b/third_party/WebKit/LayoutTests/vr/resources/presentation-setup.js |
index 33c8269e56f08f2a0020cd21f8566ffec13777aa..b024216b6ecee14596be28fef2d2c04ab3fb1a3d 100644 |
--- a/third_party/WebKit/LayoutTests/vr/resources/presentation-setup.js |
+++ b/third_party/WebKit/LayoutTests/vr/resources/presentation-setup.js |
@@ -1,9 +1,14 @@ |
+var webgl2 = false; |
var webglCanvas = document.getElementById("webgl-canvas"); |
+if (!webglCanvas) { |
+ webglCanvas = document.getElementById("webgl2-canvas"); |
+ webgl2 = true; |
+} |
var glAttributes = { |
alpha : false, |
antialias : false, |
}; |
-var gl = webglCanvas.getContext("webgl", glAttributes); |
+var gl = webglCanvas.getContext(webgl2 ? "webgl2" : "webgl", glAttributes); |
function runWithUserGesture(fn) { |
function thunk() { |