diff options
Diffstat (limited to 'testing/web-platform/tests/fenced-frame/gamepad.https.html')
-rw-r--r-- | testing/web-platform/tests/fenced-frame/gamepad.https.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fenced-frame/gamepad.https.html b/testing/web-platform/tests/fenced-frame/gamepad.https.html new file mode 100644 index 0000000000..ef6b91e921 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/gamepad.https.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>Gamepad API test</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + const key = token(); + attachFencedFrame(generateURL('resources/gamepad-inner.html', [key])); + const result = await nextValueFromServer(key); + assert_equals( + result, + 'SecurityError', + 'getGamepads should throw an error in a fenced frame'); +}, 'Gamepads information should not be read in the fenced frame.'); +</script> +</body> |