Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/vr/getVRDisplays_one_display.html |
| diff --git a/third_party/WebKit/LayoutTests/vr/getVRDisplays_one_display.html b/third_party/WebKit/LayoutTests/vr/getVRDisplays_one_display.html |
| index e2e5d3d49174b5e1b88f20c3b3a6f12095ab44ee..5379278dd31f7923d2ec88a66da4f5095e5b0be9 100644 |
| --- a/third_party/WebKit/LayoutTests/vr/getVRDisplays_one_display.html |
| +++ b/third_party/WebKit/LayoutTests/vr/getVRDisplays_one_display.html |
| @@ -7,14 +7,25 @@ |
| <script> |
| let fakeDisplays = fakeVRDisplays(); |
| -vr_test((service) => { |
| - return navigator.getVRDisplays().then(devices => { |
| - assert_true(devices != null); |
| - assert_equals(1, devices.length); |
| - assert_equals(devices[0].displayName, 'Google, Inc. Daydream View'); |
| - assert_true(devices[0].capabilities.hasOrientation); |
| - assert_true(devices != null); |
| +vr_test( (t) => { |
| + return navigator.getVRDisplays().then( (displays) => { |
| + t.step( () => { |
| + assert_true(displays != null); |
| + assert_equals(1, displays.length); |
| + let display = displays[0]; |
| + assert_equals(display.displayName, 'Google, Inc. Daydream View'); |
| + assert_true(display.capabilities.hasOrientation); |
| + assert_equals(display.depthNear, 0.01); |
|
bajones
2017/01/06 20:20:25
Again, let's try to consistently use approx_equals
bsheedy
2017/01/06 22:14:19
Done.
|
| + assert_equals(display.depthFar, 10000.0); |
| + }, "getVRDisplays returned correct results"); |
| + }, (err) => { |
| + t.step( () => { |
| + assert_unreached("getVRDisplays rejected"); |
| }); |
| -}, [fakeDisplays['Pixel']], 'test 1 VRDisplay'); |
| + }).then( () => { |
| + t.done(); |
| + }); |
| +}, [fakeDisplays["Pixel"]], |
| +"WebVR properly returns a single display"); |
| </script> |