From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. 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.toml | 35 ++++ 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 | 171 +++++++++++++++++ .../gamepad/test_gamepad_frame_state_sync.html | 19 ++ .../test_gamepad_frame_state_sync_iframe.html | 87 +++++++++ .../gamepad/test_gamepad_hidden_frame.html | 82 +++++++++ .../mochitest/gamepad/test_gamepad_iframe.html | 81 ++++++++ .../test_gamepad_multitouch_crossorigin.html | 20 ++ ...test_gamepad_multitouch_crossorigin_iframe.html | 204 +++++++++++++++++++++ .../mochitest/gamepad/test_navigator_gamepads.html | 19 ++ .../gamepad/test_navigator_gamepads_iframe.html | 123 +++++++++++++ 19 files changed, 1133 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.toml 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_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.toml b/dom/tests/mochitest/gamepad/mochitest.toml new file mode 100644 index 0000000000..c558fb43cd --- /dev/null +++ b/dom/tests/mochitest/gamepad/mochitest.toml @@ -0,0 +1,35 @@ +[DEFAULT] +scheme = "https" +prefs = [ + "dom.gamepad.test.enabled=true", +] +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"] +# Android doesn't switch tabs on window.focus() +skip-if = ["os == 'android'"] + +["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..f63b354e68 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_extensions_iframe.html @@ -0,0 +1,171 @@ + + + + + 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..bdea4e8a5a --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync_iframe.html @@ -0,0 +1,87 @@ + + + + + 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..91a84ff5ee --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_hidden_frame.html @@ -0,0 +1,82 @@ + + +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..3d9fc6a893 --- /dev/null +++ b/dom/tests/mochitest/gamepad/test_gamepad_multitouch_crossorigin_iframe.html @@ -0,0 +1,204 @@ + + + + + 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