| Index: third_party/WebKit/LayoutTests/vr/getVRDisplays_two_display.html
|
| diff --git a/third_party/WebKit/LayoutTests/vr/getVRDisplays_two_display.html b/third_party/WebKit/LayoutTests/vr/getVRDisplays_two_display.html
|
| index c88611165aca3a0d39f93eacc80421e4e83c8dd5..fb7bc321d9c073deb66e7e3e3b3b45ff0a5f34be 100644
|
| --- a/third_party/WebKit/LayoutTests/vr/getVRDisplays_two_display.html
|
| +++ b/third_party/WebKit/LayoutTests/vr/getVRDisplays_two_display.html
|
| @@ -7,18 +7,44 @@
|
| <script>
|
| let fakeDisplays = fakeVRDisplays();
|
|
|
| -vr_test((service) => {
|
| - return navigator.getVRDisplays().then(devices => {
|
| - assert_true(devices != null);
|
| - assert_equals(2, devices.length);
|
| - assert_equals(devices[0].displayName, 'Google, Inc. Daydream View');
|
| - assert_equals(devices[1].displayName, 'FakeVRDisplay');
|
| - assert_true(devices[0].capabilities.hasOrientation);
|
| - assert_true(devices[1].capabilities.hasOrientation);
|
| - assert_true(devices[0].capabilities.canPresent);
|
| - assert_false(devices[1].capabilities.canPresent);
|
| +vr_test( (t) => {
|
| + return navigator.getVRDisplays().then( (displays) => {
|
| + t.step( () => {
|
| + assert_true(displays != null);
|
| + assert_equals(2, displays.length);
|
| + }, "getVRDisplays returned correct results");
|
| + let pixel = displays[0];
|
| + let fake = displays[1];
|
| +
|
| + t.step( () => {
|
| + assert_equals(pixel.displayName, "Google, Inc. Daydream View");
|
| + assert_true(pixel.capabilities.hasOrientation);
|
| + assert_true(pixel.capabilities.canPresent);
|
| + assert_false(pixel.capabilities.hasPosition);
|
| + assert_false(pixel.capabilities.hasExternalDisplay);
|
| + assert_equals(pixel.capabilities.maxLayers, 1);
|
| + assert_equals(pixel.depthNear, 0.01);
|
| + assert_equals(pixel.depthFar, 10000.0);
|
| + }, "Pixel attributes are correct");
|
| +
|
| + t.step( () => {
|
| + assert_equals(fake.displayName, "FakeVRDisplay");
|
| + assert_true(fake.capabilities.hasOrientation);
|
| + assert_false(fake.capabilities.canPresent);
|
| + assert_false(fake.capabilities.hasPosition);
|
| + assert_false(fake.capabilities.hasExternalDisplay);
|
| + assert_equals(fake.capabilities.maxLayers, 0);
|
| + assert_equals(fake.depthNear, 0.01);
|
| + assert_equals(fake.depthFar, 10000.0);
|
| + }, "Fake device attributes are correct");
|
| + }, (err) => {
|
| + t.step( () => {
|
| + assert_unreached("getVRDisplays rejected");
|
| });
|
| -}, [fakeDisplays['Pixel'], fakeDisplays['FakeMagicWindowOnly']],
|
| -'Test 2 VRDisplays');
|
| + }).then( () => {
|
| + t.done();
|
| + });
|
| +}, [fakeDisplays["Pixel"], fakeDisplays["FakeMagicWindowOnly"]],
|
| +"Test that getVRDisplays properly returns two displays");
|
|
|
| </script>
|
|
|