Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: third_party/WebKit/LayoutTests/vr/resources/presentation-setup.js

Issue 2613103002: Added 8 new vr layout tests for various requestPresent conditions (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/vr/resources/fake-vr-displays.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var webgl2 = false;
1 var webglCanvas = document.getElementById("webgl-canvas"); 2 var webglCanvas = document.getElementById("webgl-canvas");
3 if (!webglCanvas) {
4 webglCanvas = document.getElementById("webgl2-canvas");
5 webgl2 = true;
6 }
2 var glAttributes = { 7 var glAttributes = {
3 alpha : false, 8 alpha : false,
4 antialias : false, 9 antialias : false,
5 }; 10 };
6 var gl = webglCanvas.getContext("webgl", glAttributes); 11 var gl = webglCanvas.getContext(webgl2 ? "webgl2" : "webgl", glAttributes);
7 12
8 function runWithUserGesture(fn) { 13 function runWithUserGesture(fn) {
9 function thunk() { 14 function thunk() {
10 document.removeEventListener("keypress", thunk, false); 15 document.removeEventListener("keypress", thunk, false);
11 fn() 16 fn()
12 } 17 }
13 document.addEventListener("keypress", thunk, false); 18 document.addEventListener("keypress", thunk, false);
14 eventSender.keyDown(" ", []); 19 eventSender.keyDown(" ", []);
15 } 20 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/vr/resources/fake-vr-displays.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698