Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html |
| diff --git a/third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html b/third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9623898ed35b952a74bf0a1eb6ab2dcbe2177848 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html |
| @@ -0,0 +1,12 @@ |
| +<!DOCTYPE html> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<script> |
| + |
| +promise_test(t => navigator.getVRDisplays().then(devices => { |
| + assert_true(devices != null); |
| + assert_equals(typeof devices, "object"); |
|
ddorwin
2017/01/06 02:26:10
`devices instanceof Array` should work and be a li
|
| + assert_greater_than_equal(0, devices.length); |
|
ddorwin
2017/01/06 02:26:09
You could add:
if (0 < devices.length)
assert_tr
|
| +}), "Test that getVRDisplays always resolves to at least an empty sequence."); |
|
ddorwin
2017/01/06 02:26:10
Should "to" be "with"? (Not sure if you missed thi
|
| + |
| +</script> |