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 --- testing/web-platform/tests/vibration/META.yml | 3 ++ .../tests/vibration/api-is-present.html | 26 +++++++++++++ .../tests/vibration/cancel-when-hidden-manual.html | 36 ++++++++++++++++++ .../tests/vibration/cancel-with-0-manual.html | 30 +++++++++++++++ .../vibration/cancel-with-array-0-manual.html | 31 +++++++++++++++ .../vibration/cancel-with-empty-array-manual.html | 30 +++++++++++++++ .../tests/vibration/cancel-with-new-manual.html | 31 +++++++++++++++ .../tests/vibration/idlharness.window.js | 13 +++++++ .../tests/vibration/invalid-values.html | 44 ++++++++++++++++++++++ .../vibration/pattern-array-extra-manual.html | 26 +++++++++++++ .../tests/vibration/pattern-array-manual.html | 25 ++++++++++++ .../vibration/pattern-array-with-0-manual.html | 24 ++++++++++++ .../tests/vibration/silent-ignore.html | 37 ++++++++++++++++++ .../tests/vibration/simple-array-manual.html | 22 +++++++++++ .../tests/vibration/simple-scalar-manual.html | 24 ++++++++++++ 15 files changed, 402 insertions(+) create mode 100644 testing/web-platform/tests/vibration/META.yml create mode 100644 testing/web-platform/tests/vibration/api-is-present.html create mode 100644 testing/web-platform/tests/vibration/cancel-when-hidden-manual.html create mode 100644 testing/web-platform/tests/vibration/cancel-with-0-manual.html create mode 100644 testing/web-platform/tests/vibration/cancel-with-array-0-manual.html create mode 100644 testing/web-platform/tests/vibration/cancel-with-empty-array-manual.html create mode 100644 testing/web-platform/tests/vibration/cancel-with-new-manual.html create mode 100644 testing/web-platform/tests/vibration/idlharness.window.js create mode 100644 testing/web-platform/tests/vibration/invalid-values.html create mode 100644 testing/web-platform/tests/vibration/pattern-array-extra-manual.html create mode 100644 testing/web-platform/tests/vibration/pattern-array-manual.html create mode 100644 testing/web-platform/tests/vibration/pattern-array-with-0-manual.html create mode 100644 testing/web-platform/tests/vibration/silent-ignore.html create mode 100644 testing/web-platform/tests/vibration/simple-array-manual.html create mode 100644 testing/web-platform/tests/vibration/simple-scalar-manual.html (limited to 'testing/web-platform/tests/vibration') diff --git a/testing/web-platform/tests/vibration/META.yml b/testing/web-platform/tests/vibration/META.yml new file mode 100644 index 0000000000..411450e0b1 --- /dev/null +++ b/testing/web-platform/tests/vibration/META.yml @@ -0,0 +1,3 @@ +spec: https://w3c.github.io/vibration/ +suggested_reviewers: + - anssiko diff --git a/testing/web-platform/tests/vibration/api-is-present.html b/testing/web-platform/tests/vibration/api-is-present.html new file mode 100644 index 0000000000..70aa4047e1 --- /dev/null +++ b/testing/web-platform/tests/vibration/api-is-present.html @@ -0,0 +1,26 @@ + + + + + Vibration API: test that the vibrate() method is present (with or without vendor prefix) + + + + + + +

Description

+

+ This test checks for the presence of the vibrate() method, taking + vendor prefixes into account. +

+
+ + + + + diff --git a/testing/web-platform/tests/vibration/cancel-when-hidden-manual.html b/testing/web-platform/tests/vibration/cancel-when-hidden-manual.html new file mode 100644 index 0000000000..0ae30b6235 --- /dev/null +++ b/testing/web-platform/tests/vibration/cancel-when-hidden-manual.html @@ -0,0 +1,36 @@ + + +Vibration API: cancel ongoing vibrate() when hidden by switching tab/window + + + + + + +

Description

+

+ After hitting the button below, your device must vibrate for a short period of time (roughly one + second). If it vibrates for a longer time (roughly five seconds, it should feel somewhat long) then + the test has failed. +

+ + diff --git a/testing/web-platform/tests/vibration/cancel-with-0-manual.html b/testing/web-platform/tests/vibration/cancel-with-0-manual.html new file mode 100644 index 0000000000..86981c11f8 --- /dev/null +++ b/testing/web-platform/tests/vibration/cancel-with-0-manual.html @@ -0,0 +1,30 @@ + + + + + Vibration API: cancel ongoing vibrate() with 0 + + + + + + +

Description

+

+ After hitting the button below, your device must vibrate for a short period of time (roughly one + second). If it vibrates for a longer time (roughly five seconds, it should feel somewhat long) then + the test has failed. +

+ + + + diff --git a/testing/web-platform/tests/vibration/cancel-with-array-0-manual.html b/testing/web-platform/tests/vibration/cancel-with-array-0-manual.html new file mode 100644 index 0000000000..9cdf282ebc --- /dev/null +++ b/testing/web-platform/tests/vibration/cancel-with-array-0-manual.html @@ -0,0 +1,31 @@ + + +Vibration API: cancel ongoing vibrate() with [0] + + + + + + +

Description

+

+ After hitting the button below, your device must vibrate for a short period of time (roughly one + second). If it vibrates for a longer time (roughly five seconds, it should feel somewhat long) then + the test has failed. +

+ + diff --git a/testing/web-platform/tests/vibration/cancel-with-empty-array-manual.html b/testing/web-platform/tests/vibration/cancel-with-empty-array-manual.html new file mode 100644 index 0000000000..8e48173e7e --- /dev/null +++ b/testing/web-platform/tests/vibration/cancel-with-empty-array-manual.html @@ -0,0 +1,30 @@ + + + + + Vibration API: cancel ongoing vibrate() with [] + + + + + + +

Description

+

+ After hitting the button below, your device must vibrate for a short period of time (roughly one + second). If it vibrates for a longer time (roughly five seconds, it should feel somewhat long) then + the test has failed. +

+ + + + diff --git a/testing/web-platform/tests/vibration/cancel-with-new-manual.html b/testing/web-platform/tests/vibration/cancel-with-new-manual.html new file mode 100644 index 0000000000..64e6e9b548 --- /dev/null +++ b/testing/web-platform/tests/vibration/cancel-with-new-manual.html @@ -0,0 +1,31 @@ + + + + + Vibration API: cancel ongoing vibrate() with a new call to vibrate + + + + + + +

Description

+

+ After hitting the button below, your device must vibrate continuously for a short period of time (roughly one + second), then vibrate a series of short bursts. If the initial continuously vibration is longer (roughly five + seconds, it should feel somewhat long) or if there is no series of short vibration bursts then the test has + failed. +

+ + + + diff --git a/testing/web-platform/tests/vibration/idlharness.window.js b/testing/web-platform/tests/vibration/idlharness.window.js new file mode 100644 index 0000000000..a3cfbc11e0 --- /dev/null +++ b/testing/web-platform/tests/vibration/idlharness.window.js @@ -0,0 +1,13 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js +// META: timeout=long + +'use strict'; + +idl_test( + ['vibration'], + ['html'], + idl_array => { + idl_array.add_objects({Navigator: ['navigator']}); + } +); diff --git a/testing/web-platform/tests/vibration/invalid-values.html b/testing/web-platform/tests/vibration/invalid-values.html new file mode 100644 index 0000000000..b5a3f39ac6 --- /dev/null +++ b/testing/web-platform/tests/vibration/invalid-values.html @@ -0,0 +1,44 @@ + + +Vibration API: vibrate(invalid) + + + + +
+ diff --git a/testing/web-platform/tests/vibration/pattern-array-extra-manual.html b/testing/web-platform/tests/vibration/pattern-array-extra-manual.html new file mode 100644 index 0000000000..b23323ace2 --- /dev/null +++ b/testing/web-platform/tests/vibration/pattern-array-extra-manual.html @@ -0,0 +1,26 @@ + + + + + Vibration API: test a pattern array parameter to vibrate() with an extra (even) item + + + + + + +

Description

+

+ After hitting the button below, your device must vibrate three times for one second, separated + by one second intervals. +

+ + + + diff --git a/testing/web-platform/tests/vibration/pattern-array-manual.html b/testing/web-platform/tests/vibration/pattern-array-manual.html new file mode 100644 index 0000000000..0c7063f1e0 --- /dev/null +++ b/testing/web-platform/tests/vibration/pattern-array-manual.html @@ -0,0 +1,25 @@ + + + + + Vibration API: test a pattern array parameter to vibrate() + + + + + +

Description

+

+ After hitting the button below, your device must vibrate three times for one second, separated + by one second intervals. +

+ + + + diff --git a/testing/web-platform/tests/vibration/pattern-array-with-0-manual.html b/testing/web-platform/tests/vibration/pattern-array-with-0-manual.html new file mode 100644 index 0000000000..491f2b1675 --- /dev/null +++ b/testing/web-platform/tests/vibration/pattern-array-with-0-manual.html @@ -0,0 +1,24 @@ + + +Vibration API: test a pattern array with 0ms vibration and still to vibrate() + + + + + +

Description

+

+ After hitting the button below, your device must vibrate continuously for about two seconds, once. +

+ +
+ diff --git a/testing/web-platform/tests/vibration/silent-ignore.html b/testing/web-platform/tests/vibration/silent-ignore.html new file mode 100644 index 0000000000..a04c648bd1 --- /dev/null +++ b/testing/web-platform/tests/vibration/silent-ignore.html @@ -0,0 +1,37 @@ + + + + + Vibration API: test that calls to vibrate() are silently ignored when the device cannot vibrate + + + + + + +

Description

+

+ This test is only useful on devices that do not have vibration capability. + If your device supports vibration, then skip this test. An implementation + supporting this API but running on a device that cannot vibrate must silently ignore the + call (we test that it doesn't throw). +

+ +
+ + + + + + + diff --git a/testing/web-platform/tests/vibration/simple-array-manual.html b/testing/web-platform/tests/vibration/simple-array-manual.html new file mode 100644 index 0000000000..52fa99773c --- /dev/null +++ b/testing/web-platform/tests/vibration/simple-array-manual.html @@ -0,0 +1,22 @@ + + + + + Vibration API: test a simple array parameter to vibrate() + + + + +

Description

+

+ After hitting the button below, your device must vibrate continuously for about two seconds, once. +

+ +
+ + + diff --git a/testing/web-platform/tests/vibration/simple-scalar-manual.html b/testing/web-platform/tests/vibration/simple-scalar-manual.html new file mode 100644 index 0000000000..16fc2a9f85 --- /dev/null +++ b/testing/web-platform/tests/vibration/simple-scalar-manual.html @@ -0,0 +1,24 @@ + + + + + Vibration API: test a simple scalar parameter to vibrate() + + + + + +

Description

+

+ After hitting the button below, your device must vibrate continuously for about two seconds, once. +

+ + + + -- cgit v1.2.3