blob: c8bf24ceb5e7bbaa76ff6e5ec8086f306360e01f [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<!-- Generate token with the command:
tools/origin_trials/generate_token.py http://127.0.0.1:8000 WebXRGamepadSupport --expire-timestamp=2000000000
To test whether the token is working, run virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/xr tests.
-->
<title>WebXRGamepadSupport - interfaces exposed by origin trial</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/origin-trials-helper.js"></script>
<script>
const token="AmQCIm7DYplQu/Vuep/62Rwyu+gYKwA1kz4CkNQWwtUnkr4o+kHqiSBZYD6APsbzyDDKm5xKi4BH4MxnheS8qwIAAABbeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiV2ViWFJHYW1lcGFkU3VwcG9ydCIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==";
const properties_to_check = {
'Gamepad': ['hand', 'displayId'],
}
// Skip this test if flags are not set properly.
if(!self.internals.runtimeFlags.webXRGamepadSupportEnabled) {
test(t => {
OriginTrialsHelper.check_properties_missing(this, properties_to_check);
}, "Additional WebXR Gamepad Support properties are not available without a token.");
}
OriginTrialsHelper.add_token(token);
test(t => {
OriginTrialsHelper.check_properties(this, properties_to_check);
}, 'Additional WebXR Gamepad Support properties are available.');
</script>