<!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_true(devices instanceof Array); | |
assert_greater_than_equal(0, devices.length); | |
if (devices.length > 0) | |
assert_true(devices[0] instanceof VRDisplay); | |
}), "Test that getVRDisplays always resolves with at least an empty sequence."); | |
</script> |