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

Unified Diff: chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js

Issue 2883273006: Better generalize VR test framework (Closed)
Patch Set: Make VrTestRule extend ChromeTabbedActivityTestRule Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
diff --git a/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js b/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
index 4d168c5da45aa2d69f13c35b9c80319fd4ee1c7b..0cd32267125002d058e006df026e730972e6fc9d 100644
--- a/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
+++ b/chrome/test/data/android/webvr_instrumentation/resources/webvr_boilerplate.js
@@ -2,6 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Add additional setup steps to the object from webvr_e2e.js if it exists
tiborg 2017/05/30 14:41:23 Nit: end with period.
bsheedy 2017/05/30 18:15:36 Done.
+if (typeof initializationSteps !== "undefined") {
+ initializationSteps["getVRDisplays"] = false;
+} else {
+ // Create here if it doesn't exist so we can access it later without checking
+ // if it's defined
tiborg 2017/05/30 14:41:23 Nit: end with period.
bsheedy 2017/05/30 18:15:36 Done.
+ var initializationSteps = {};
+}
+
var webglCanvas = document.getElementById("webgl-canvas");
var glAttribs = {
alpha: false,
@@ -67,10 +76,10 @@ if (navigator.getVRDisplays) {
vrDisplay = displays[0];
}
}).then( () => {
- vrDisplayPromiseDone = true;
+ initializationSteps["getVRDisplays"] = true;
});
} else {
- vrDisplayPromiseDone = true;
+ initializationSteps["getVRDisplays"] = true;
}
gl.clearColor(1.0, 0.0, 0.0, 1.0);

Powered by Google App Engine
This is Rietveld 408576698