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

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

Issue 2883273006: Better generalize VR test framework (Closed)
Patch Set: Address nits 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..87d6f8335f5982546f622a61d9b68fdcb5d55fe2 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.
+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.
+ 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