From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- .../motion/add-during-dispatch.https.html | 30 +++ .../motion/add-listener-from-callback.https.html | 49 ++++ .../motion/create-event.https.html | 41 ++++ .../motion/free-fall-manual.https.html | 48 ++++ .../motion/multiple-event-listeners.https.html | 26 +++ .../motion/null-values.https.html | 39 ++++ .../motion/optional-event-properties.https.html | 257 +++++++++++++++++++++ .../motion/page-visibility-manual.https.html | 28 +++ .../motion/requestPermission.https.window.js | 48 ++++ .../motion/screen-upmost-manual.https.html | 51 ++++ .../motion/screen-upright-manual.https.html | 50 ++++ .../motion/t025-manual.https.html | 38 +++ .../motion/t028-manual.https.html | 36 +++ 13 files changed, 741 insertions(+) create mode 100644 testing/web-platform/tests/orientation-event/motion/add-during-dispatch.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/add-listener-from-callback.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/create-event.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/free-fall-manual.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/multiple-event-listeners.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/null-values.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/optional-event-properties.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/page-visibility-manual.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/requestPermission.https.window.js create mode 100644 testing/web-platform/tests/orientation-event/motion/screen-upmost-manual.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/screen-upright-manual.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/t025-manual.https.html create mode 100644 testing/web-platform/tests/orientation-event/motion/t028-manual.https.html (limited to 'testing/web-platform/tests/orientation-event/motion') diff --git a/testing/web-platform/tests/orientation-event/motion/add-during-dispatch.https.html b/testing/web-platform/tests/orientation-event/motion/add-during-dispatch.https.html new file mode 100644 index 0000000000..3a895b9d09 --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/add-during-dispatch.https.html @@ -0,0 +1,30 @@ + + + + + + + diff --git a/testing/web-platform/tests/orientation-event/motion/add-listener-from-callback.https.html b/testing/web-platform/tests/orientation-event/motion/add-listener-from-callback.https.html new file mode 100644 index 0000000000..0803d7cc9b --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/add-listener-from-callback.https.html @@ -0,0 +1,49 @@ + + + + + + + diff --git a/testing/web-platform/tests/orientation-event/motion/create-event.https.html b/testing/web-platform/tests/orientation-event/motion/create-event.https.html new file mode 100644 index 0000000000..e8a2c469b1 --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/create-event.https.html @@ -0,0 +1,41 @@ + + + + diff --git a/testing/web-platform/tests/orientation-event/motion/free-fall-manual.https.html b/testing/web-platform/tests/orientation-event/motion/free-fall-manual.https.html new file mode 100644 index 0000000000..c71f61fa69 --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/free-fall-manual.https.html @@ -0,0 +1,48 @@ + + + + DeviceMotionEvent: A device in free-fall, with the screen horizontal and upmost + + + + + + +

Free fall the device to run the test, with the screen horizontal and upmost.

+
+ + + + diff --git a/testing/web-platform/tests/orientation-event/motion/multiple-event-listeners.https.html b/testing/web-platform/tests/orientation-event/motion/multiple-event-listeners.https.html new file mode 100644 index 0000000000..3b13d632ac --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/multiple-event-listeners.https.html @@ -0,0 +1,26 @@ + + + + + + + diff --git a/testing/web-platform/tests/orientation-event/motion/null-values.https.html b/testing/web-platform/tests/orientation-event/motion/null-values.https.html new file mode 100644 index 0000000000..b6a2a1622f --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/null-values.https.html @@ -0,0 +1,39 @@ + + + + + + + diff --git a/testing/web-platform/tests/orientation-event/motion/optional-event-properties.https.html b/testing/web-platform/tests/orientation-event/motion/optional-event-properties.https.html new file mode 100644 index 0000000000..0a73721cb9 --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/optional-event-properties.https.html @@ -0,0 +1,257 @@ + + + + diff --git a/testing/web-platform/tests/orientation-event/motion/page-visibility-manual.https.html b/testing/web-platform/tests/orientation-event/motion/page-visibility-manual.https.html new file mode 100644 index 0000000000..37e48ce979 --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/page-visibility-manual.https.html @@ -0,0 +1,28 @@ + + + + + + + +

Switch the page to the background, then switch back to it.

diff --git a/testing/web-platform/tests/orientation-event/motion/requestPermission.https.window.js b/testing/web-platform/tests/orientation-event/motion/requestPermission.https.window.js new file mode 100644 index 0000000000..2c96d26d10 --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/requestPermission.https.window.js @@ -0,0 +1,48 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js + +'use strict'; + +// The Device Orientation spec does not fully integrate with the Permissions +// spec and does not list the permissions that are expected for +// requestPermission() to work. The list below was based on the permission +// tokens corresponding to the sensors used to implement support for motion +// events. They also match the feature policy tokens required by both Blink and +// WebKit. +const permissionDescriptorNames = ['accelerometer', 'gyroscope']; + +promise_test(async (t) => { + await Promise.all(permissionDescriptorNames.map( + name => test_driver.set_permission({name}, 'granted'))); + + const permission = await DeviceMotionEvent.requestPermission(); + assert_equals(permission, 'granted'); +}, 'requestPermission() returns "granted" for granted permissions without user activation'); + +promise_test(async (t) => { + await Promise.all(permissionDescriptorNames.map( + name => test_driver.set_permission({name}, 'granted'))); + + return test_driver.bless('enable user activation', async () => { + const permission = await DeviceMotionEvent.requestPermission(); + assert_equals(permission, 'granted'); + }); +}, 'requestPermission() returns "granted" for granted permissions with user activation'); + +promise_test(async (t) => { + await Promise.all(permissionDescriptorNames.map( + name => test_driver.set_permission({name}, 'denied'))); + + const permission = await DeviceMotionEvent.requestPermission(); + assert_equals(permission, 'denied'); +}, 'requestPermission() returns "denied" for denied permissions without user activation'); + +promise_test(async (t) => { + await Promise.all(permissionDescriptorNames.map( + name => test_driver.set_permission({name}, 'denied'))); + + return test_driver.bless('enable user activation', async () => { + const permission = await DeviceMotionEvent.requestPermission(); + assert_equals(permission, 'denied'); + }); +}, 'requestPermission() returns "denied" for denied permissions with user activation'); diff --git a/testing/web-platform/tests/orientation-event/motion/screen-upmost-manual.https.html b/testing/web-platform/tests/orientation-event/motion/screen-upmost-manual.https.html new file mode 100644 index 0000000000..560c3e3a1f --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/screen-upmost-manual.https.html @@ -0,0 +1,51 @@ + + + + DeviceMotionEvent: A device lying flat on a horizontal surface with the screen upmost + + + + + + +

Put the device on a horizontal surface with the screen upmost.

+
+ + + + diff --git a/testing/web-platform/tests/orientation-event/motion/screen-upright-manual.https.html b/testing/web-platform/tests/orientation-event/motion/screen-upright-manual.https.html new file mode 100644 index 0000000000..8a1b6d27da --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/screen-upright-manual.https.html @@ -0,0 +1,50 @@ + + + + DeviceMotionEvent: A device with the screen upright + + + + + + +

Put the device with the screen upright.

+
+ + + + diff --git a/testing/web-platform/tests/orientation-event/motion/t025-manual.https.html b/testing/web-platform/tests/orientation-event/motion/t025-manual.https.html new file mode 100644 index 0000000000..9489855fcd --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/t025-manual.https.html @@ -0,0 +1,38 @@ + + + + Implementations that are unable to provide acceleration data without the effect of gravity may instead supply the acceleration including the effect of gravity + + + + + + + +

Move the device to run the test.

+
+ + + + diff --git a/testing/web-platform/tests/orientation-event/motion/t028-manual.https.html b/testing/web-platform/tests/orientation-event/motion/t028-manual.https.html new file mode 100644 index 0000000000..669c4e47e0 --- /dev/null +++ b/testing/web-platform/tests/orientation-event/motion/t028-manual.https.html @@ -0,0 +1,36 @@ + + + + The interval property must be expressed in milliseconds. It must be a constant, to simplify filtering of the data by the Web application + + + + + + + +

Move the device to run the test.

+
+ + + + -- cgit v1.2.3