Bug 1881177 [wpt PR 44691] - Gamepad: test interfaces are in insecure context, a=testonly

Automatic update from web-platform-tests
Test interfaces are in insecure context (#44691)

--

wpt-commits: 1871d068a7359fff334f75507b88a956cf80e516
wpt-pr: 44691
This commit is contained in:
Marcos Cáceres 2024-02-23 04:24:09 +00:00 коммит произвёл moz-wptsync-bot
Родитель ba396fd0c4
Коммит 991333a046
3 изменённых файлов: 0 добавлений и 17 удалений

Просмотреть файл

@ -1,17 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Gamepad Test: non-secure contexts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// Old Firefox didn't expose them to non-secure contexts while Chrome and Safari always did
test(() => {
assert_implements(Navigator.prototype.getGamepads, "in prototype");
assert_implements(navigator.getGamepads, "on instance");
// Gamepad API types should also be exposed in non-secure contexts.
assert_implements(window.Gamepad, "Gamepad interface is exposed");
assert_implements(window.GamepadButton, "GamepadButton interface is exposed");
assert_implements(window.GamepadEvent, "GamepadEvent interface is exposed");
}, "Gamepad API is not exposed in non-secure contexts");
</script>