Chromium Code Reviews| 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); |