From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- dom/tests/mochitest/gamepad/gamepad_frame.html | 22 ++ .../mochitest/gamepad/gamepad_frame_state.html | 16 ++ dom/tests/mochitest/gamepad/mochitest.ini | 23 ++ dom/tests/mochitest/gamepad/mock_gamepad.js | 19 ++ .../mochitest/gamepad/test_check_timestamp.html | 20 ++ .../gamepad/test_check_timestamp_iframe.html | 71 ++++++ dom/tests/mochitest/gamepad/test_gamepad.html | 20 ++ .../gamepad/test_gamepad_connect_events.html | 22 ++ .../test_gamepad_connect_events_iframe.html | 83 +++++++ .../mochitest/gamepad/test_gamepad_extensions.html | 19 ++ .../gamepad/test_gamepad_extensions_iframe.html | 179 ++++++++++++++ .../gamepad/test_gamepad_frame_state_sync.html | 19 ++ .../test_gamepad_frame_state_sync_iframe.html | 113 +++++++++ .../gamepad/test_gamepad_hidden_frame.html | 19 ++ .../gamepad/test_gamepad_hidden_frame_iframe.html | 81 +++++++ .../mochitest/gamepad/test_gamepad_iframe.html | 81 +++++++ .../test_gamepad_multitouch_crossorigin.html | 20 ++ ...test_gamepad_multitouch_crossorigin_iframe.html | 256 +++++++++++++++++++++ .../mochitest/gamepad/test_navigator_gamepads.html | 19 ++ .../gamepad/test_navigator_gamepads_iframe.html | 123 ++++++++++ 20 files changed, 1225 insertions(+) create mode 100644 dom/tests/mochitest/gamepad/gamepad_frame.html create mode 100644 dom/tests/mochitest/gamepad/gamepad_frame_state.html create mode 100644 dom/tests/mochitest/gamepad/mochitest.ini create mode 100644 dom/tests/mochitest/gamepad/mock_gamepad.js create mode 100644 dom/tests/mochitest/gamepad/test_check_timestamp.html create mode 100644 dom/tests/mochitest/gamepad/test_check_timestamp_iframe.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_connect_events.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_connect_events_iframe.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_extensions.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_extensions_iframe.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync_iframe.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_hidden_frame.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_hidden_frame_iframe.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_iframe.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin.html create mode 100644 dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin_iframe.html create mode 100644 dom/tests/mochitest/gamepad/test_navigator_gamepads.html create mode 100644 dom/tests/mochitest/gamepad/test_navigator_gamepads_iframe.html (limited to 'dom/tests/mochitest/gamepad') diff --git a/dom/tests/mochitest/gamepad/gamepad_frame.html b/dom/tests/mochitest/gamepad/gamepad_frame.html new file mode 100644 index 0000000000..dae1e92b1b --- /dev/null +++ b/dom/tests/mochitest/gamepad/gamepad_frame.html @@ -0,0 +1,22 @@ + + + + + frame + + + + + diff --git a/dom/tests/mochitest/gamepad/gamepad_frame_state.html b/dom/tests/mochitest/gamepad/gamepad_frame_state.html new file mode 100644 index 0000000000..a53b91b2cb --- /dev/null +++ b/dom/tests/mochitest/gamepad/gamepad_frame_state.html @@ -0,0 +1,16 @@ + + + + + frame + + + + + diff --git a/dom/tests/mochitest/gamepad/mochitest.ini b/dom/tests/mochitest/gamepad/mochitest.ini new file mode 100644 index 0000000000..63aecbc623 --- /dev/null +++ b/dom/tests/mochitest/gamepad/mochitest.ini @@ -0,0 +1,23 @@ +[DEFAULT] +scheme = https +support-files = + gamepad_frame.html + gamepad_frame_state.html + mock_gamepad.js + +[test_check_timestamp.html] +support-files = test_check_timestamp_iframe.html +[test_gamepad.html] +support-files = test_gamepad_iframe.html +[test_gamepad_connect_events.html] +support-files = test_gamepad_connect_events_iframe.html +[test_gamepad_extensions.html] +support-files = test_gamepad_extensions_iframe.html +[test_gamepad_frame_state_sync.html] +support-files = test_gamepad_frame_state_sync_iframe.html +[test_gamepad_hidden_frame.html] +support-files = test_gamepad_hidden_frame_iframe.html +[test_gamepad_multitouch_crossorigin.html] +support-files = test_gamepad_multitouch_crossorigin_iframe.html +[test_navigator_gamepads.html] +support-files = test_navigator_gamepads_iframe.html diff --git a/dom/tests/mochitest/gamepad/mock_gamepad.js b/dom/tests/mochitest/gamepad/mock_gamepad.js new file mode 100644 index 0000000000..778035ef10 --- /dev/null +++ b/dom/tests/mochitest/gamepad/mock_gamepad.js @@ -0,0 +1,19 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +var GamepadService; + +async function setGamepadPreferenceAndCreateIframe(iframeSrc) { + await SpecialPowers.pushPrefEnv({ + set: [["dom.gamepad.test.enabled", true]], + }); + + let iframe = document.createElement("iframe"); + iframe.src = iframeSrc; + document.body.appendChild(iframe); +} + +function runGamepadTest(callback) { + GamepadService = navigator.requestGamepadServiceTest(); + callback(); +} diff --git a/dom/tests/mochitest/gamepad/test_check_timestamp.html b/dom/tests/mochitest/gamepad/test_check_timestamp.html new file mode 100644 index 0000000000..04fc8dc9d8 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_check_timestamp.html @@ -0,0 +1,20 @@ + + + + + Test Gamepad.timestamp + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_check_timestamp_iframe.html b/dom/tests/mochitest/gamepad/test_check_timestamp_iframe.html new file mode 100644 index 0000000000..ca99c26746 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_check_timestamp_iframe.html @@ -0,0 +1,71 @@ + + + + + Test Gamepad.timestamp + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad.html b/dom/tests/mochitest/gamepad/test_gamepad.html new file mode 100644 index 0000000000..4e7c9a32bc --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad.html @@ -0,0 +1,20 @@ + + + + + Test gamepad + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_connect_events.html b/dom/tests/mochitest/gamepad/test_gamepad_connect_events.html new file mode 100644 index 0000000000..f505ceb9d9 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_connect_events.html @@ -0,0 +1,22 @@ + + + + + + Test hidden frames + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_connect_events_iframe.html b/dom/tests/mochitest/gamepad/test_gamepad_connect_events_iframe.html new file mode 100644 index 0000000000..278e6796c0 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_connect_events_iframe.html @@ -0,0 +1,83 @@ + + + + + + Test hidden frames + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_extensions.html b/dom/tests/mochitest/gamepad/test_gamepad_extensions.html new file mode 100644 index 0000000000..364ad540fe --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_extensions.html @@ -0,0 +1,19 @@ + + + + + Test gamepad + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_extensions_iframe.html b/dom/tests/mochitest/gamepad/test_gamepad_extensions_iframe.html new file mode 100644 index 0000000000..6db4b85bb6 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_extensions_iframe.html @@ -0,0 +1,179 @@ + + + + + Test gamepad + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync.html b/dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync.html new file mode 100644 index 0000000000..927a4e54bb --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync.html @@ -0,0 +1,19 @@ + + + + + Test hidden frames + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync_iframe.html b/dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync_iframe.html new file mode 100644 index 0000000000..d64197dce0 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync_iframe.html @@ -0,0 +1,113 @@ + + + + + Test hidden frames + + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_hidden_frame.html b/dom/tests/mochitest/gamepad/test_gamepad_hidden_frame.html new file mode 100644 index 0000000000..985f001ca4 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_hidden_frame.html @@ -0,0 +1,19 @@ + + + + + Test hidden frames + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_hidden_frame_iframe.html b/dom/tests/mochitest/gamepad/test_gamepad_hidden_frame_iframe.html new file mode 100644 index 0000000000..60ad2edd01 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_hidden_frame_iframe.html @@ -0,0 +1,81 @@ + + + + + Test hidden frames + + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_iframe.html b/dom/tests/mochitest/gamepad/test_gamepad_iframe.html new file mode 100644 index 0000000000..f7e29c1761 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_iframe.html @@ -0,0 +1,81 @@ + + + + + Test gamepad + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin.html b/dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin.html new file mode 100644 index 0000000000..244b2f18dc --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin.html @@ -0,0 +1,20 @@ + + + + + Test hidden frames + + + + + + + + + \ No newline at end of file diff --git a/dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin_iframe.html b/dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin_iframe.html new file mode 100644 index 0000000000..de551fac06 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin_iframe.html @@ -0,0 +1,256 @@ + + + + + Test gamepad + + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_navigator_gamepads.html b/dom/tests/mochitest/gamepad/test_navigator_gamepads.html new file mode 100644 index 0000000000..06dc214a45 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_navigator_gamepads.html @@ -0,0 +1,19 @@ + + + + + Test gamepad + + + + + + + + diff --git a/dom/tests/mochitest/gamepad/test_navigator_gamepads_iframe.html b/dom/tests/mochitest/gamepad/test_navigator_gamepads_iframe.html new file mode 100644 index 0000000000..9c98bac2d3 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_navigator_gamepads_iframe.html @@ -0,0 +1,123 @@ + + + + + Test gamepad + + + + + + + -- cgit v1.2.3