diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-13 13:33:08 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-13 13:33:08 +0000 |
commit | 13f505539c5c0deff72cc1c007eaa9be1979d294 (patch) | |
tree | b115bf7f8c8933412282687146cd4f55118c4806 /testing/web-platform | |
parent | 5262e01a4e56b8727fba5710320ccc74918f1300 (diff) | |
download | UXP-13f505539c5c0deff72cc1c007eaa9be1979d294.tar UXP-13f505539c5c0deff72cc1c007eaa9be1979d294.tar.gz UXP-13f505539c5c0deff72cc1c007eaa9be1979d294.tar.lz UXP-13f505539c5c0deff72cc1c007eaa9be1979d294.tar.xz UXP-13f505539c5c0deff72cc1c007eaa9be1979d294.zip |
Issue #1682 - Remove vibrator DOM interface and support code.
Resolves #1682
Diffstat (limited to 'testing/web-platform')
15 files changed, 0 insertions, 455 deletions
diff --git a/testing/web-platform/tests/vibration/OWNERS b/testing/web-platform/tests/vibration/OWNERS deleted file mode 100644 index 4020ed82e..000000000 --- a/testing/web-platform/tests/vibration/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -@dontcallmedom -@zqzhang -@xinliux diff --git a/testing/web-platform/tests/vibration/api-is-present.html b/testing/web-platform/tests/vibration/api-is-present.html deleted file mode 100644 index f5c976dff..000000000 --- a/testing/web-platform/tests/vibration/api-is-present.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: test that the vibrate() method is present (with or without vendor prefix)</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom'/> - <meta name='assert' content='Check that the vibrate() method is present.'/> - </head> - <body> - <h1>Description</h1> - <p> - This test checks for the presence of the <code>vibrate()</code> method, taking - vendor prefixes into account. - </p> - <div id='log'></div> - <script src='/resources/testharness.js'></script> - <script src='/resources/testharnessreport.js'></script> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - test(function () { - assert_true(undefined !== navigator.vibrate, "navigator.vibrate exists"); - }, "vibrate() is present on navigator"); - </script> - </body> -</html> diff --git a/testing/web-platform/tests/vibration/cancel-when-hidden-manual.html b/testing/web-platform/tests/vibration/cancel-when-hidden-manual.html deleted file mode 100644 index 569970758..000000000 --- a/testing/web-platform/tests/vibration/cancel-when-hidden-manual.html +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE html> -<meta charset='utf-8'> -<title>Vibration API: cancel ongoing vibrate() when hidden by switching tab/window</title> -<link rel='author' title='Intel' href='http://www.intel.com'> -<link rel='help' href='http://dev.w3.org/2009/dap/vibration/#vibration-interface'> -<meta name='flags' content='interact'> -<meta name='assert' content='If the visibilitychange event is dispatched at the Document in a browsing context, cancel the pre-existing instance of the processing vibration patterns algorithm'> -<style> - button { - height: 100px; - width: 100px; - } -</style> - -<h1>Description</h1> -<p> - 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. -</p> -<button id='vib'>Vibrate!</button> -<script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> -<script> - var win; - - if (undefined !== navigator.vibrate) { - document.getElementById('vib').onclick = function () { - navigator.vibrate(5000); - setTimeout(function () { - win = window.open('about:blank', '_blank'); - setTimeout(function() { - win.close(); - }, 100); - }, 1000); - }; - } -</script> - diff --git a/testing/web-platform/tests/vibration/cancel-with-0-manual.html b/testing/web-platform/tests/vibration/cancel-with-0-manual.html deleted file mode 100644 index 6890d5764..000000000 --- a/testing/web-platform/tests/vibration/cancel-with-0-manual.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: cancel ongoing vibrate() with 0</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom, interact'/> - <meta name='assert' content='If pattern is 0, cancel the pre-existing instance of the processing vibration patterns algorithm'/> - </head> - <body> - <h1>Description</h1> - <p> - 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. - </p> - <button id='vib'>Vibrate!</button> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - if (undefined !== navigator.vibrate) { - document.getElementById("vib").onclick = function () { - navigator.vibrate(5000); - setTimeout(function () { - navigator.vibrate(0); - }, 1000); - }; - } - </script> - </body> -</html> 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 deleted file mode 100644 index 60689cc2c..000000000 --- a/testing/web-platform/tests/vibration/cancel-with-array-0-manual.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<meta charset='utf-8'> -<title>Vibration API: cancel ongoing vibrate() with [0]</title> -<link rel='author' title='Intel' href='http://www.intel.com'> -<link rel='help' href='http://dev.w3.org/2009/dap/vibration/#vibration-interface'> -<meta name='flags' content='interact'> -<meta name='assert' content='If pattern contains a single entry with a value of 0, cancel the pre-existing instance of the processing vibration patterns algorithm'> -<style> - button { - height: 100px; - width: 100px; - } -</style> - -<h1>Description</h1> -<p> - 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. -</p> -<button id='vib'>Vibrate!</button> -<script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> -<script> - if (undefined !== navigator.vibrate) { - document.getElementById('vib').onclick = function () { - navigator.vibrate(5000); - setTimeout(function () { - navigator.vibrate([0]); - }, 1000); - }; - } -</script> - 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 deleted file mode 100644 index 9d4be2b3a..000000000 --- a/testing/web-platform/tests/vibration/cancel-with-empty-array-manual.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: cancel ongoing vibrate() with []</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom, interact'/> - <meta name='assert' content='If pattern is an empty list, cancel the pre-existing instance of the processing vibration patterns algorithm'/> - </head> - <body> - <h1>Description</h1> - <p> - 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. - </p> - <button id='vib'>Vibrate!</button> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - if (undefined !== navigator.vibrate) { - document.getElementById("vib").onclick = function () { - navigator.vibrate(5000); - setTimeout(function () { - navigator.vibrate([]); - }, 1000); - }; - } - </script> - </body> -</html> diff --git a/testing/web-platform/tests/vibration/cancel-with-new-manual.html b/testing/web-platform/tests/vibration/cancel-with-new-manual.html deleted file mode 100644 index 1cd9daf17..000000000 --- a/testing/web-platform/tests/vibration/cancel-with-new-manual.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: cancel ongoing vibrate() with a new call to vibrate</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom, interact'/> - <meta name='assert' content='Cancel the pre-existing instance of the processing vibration patterns algorithm, if any.'/> - </head> - <body> - <h1>Description</h1> - <p> - 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. - </p> - <button id='vib'>Vibrate!</button> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - if (undefined !== navigator.vibrate) { - document.getElementById("vib").onclick = function () { - navigator.vibrate(5000); - setTimeout(function () { - navigator.vibrate([200, 200, 200, 200, 200, 200, 200, 200, 200]); - }, 1000); - }; - } - </script> - </body> -</html> diff --git a/testing/web-platform/tests/vibration/idl.html b/testing/web-platform/tests/vibration/idl.html deleted file mode 100644 index 167090cd6..000000000 --- a/testing/web-platform/tests/vibration/idl.html +++ /dev/null @@ -1,23 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>IDL harness tests for Vibration API</title> -<body> - <h1>Description</h1> - <p> - This test validates the IDL defined by the Vibration API. - </p> - <p> - This test uses <a href="/resources/idlharness.js">idlharness.js</a> - </p> -<div id="log"></div> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=/resources/WebIDLParser.js></script> -<script src=/resources/idlharness.js></script> -<script> -var idl_array = new IdlArray(); -idl_array.add_untested_idls("interface Navigator {};"); -idl_array.add_idls("partial interface Navigator { boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);};"); -idl_array.add_objects({Navigator: ['navigator']}); -idl_array.test(); -</script> diff --git a/testing/web-platform/tests/vibration/invalid-values.html b/testing/web-platform/tests/vibration/invalid-values.html deleted file mode 100644 index a544ac23c..000000000 --- a/testing/web-platform/tests/vibration/invalid-values.html +++ /dev/null @@ -1,79 +0,0 @@ -<!DOCTYPE html> -<meta charset='utf-8'> -<title>Vibration API: vibrate(invalid)</title> -<link rel='author' title='Intel' href='http://www.intel.com'> -<link rel='help' href='http://dev.w3.org/2009/dap/vibration/#vibration-interface'> - -<h1>Description</h1> -<p> - This test checks the <code>vibrate()</code> method with invalid parameter, - taking vendor prefixes into account. -</p> -<div id='log'></div> -<script src='/resources/testharness.js'></script> -<script src='/resources/testharnessreport.js'></script> -<script src='../support/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> -<script> - test(function() { - assert_throws(new TypeError(), function() { - navigator.vibrate(); - }, 'Argument is required, so was expecting a TypeError.'); - }, 'Missing pattern argument'); - - test(function() { - try { - navigator.vibrate(undefined); - } catch(e) { - assert_unreached('error message: ' + e.message); - } - }, 'pattern of undefined resolves to []'); - - test(function() { - try { - navigator.vibrate(null); - } catch(e) { - assert_unreached('error message: ' + e.message); - } - }, 'pattern of null resolves to []'); - - test(function() { - try { - navigator.vibrate('one'); - } catch(e) { - assert_unreached('error message: ' + e.message); - } - }, 'pattern of empty string resolves to [""]'); - - test(function() { - try { - navigator.vibrate('one'); - } catch(e) { - assert_unreached('error message: ' + e.message); - } - }, 'pattern of string resolves to ["one"]'); - - test(function() { - try { - navigator.vibrate(new String('one')); - } catch(e) { - assert_unreached('error message: ' + e.message); - } - }, 'pattern of String instance resolves to ["one"]'); - - test(function() { - try { - navigator.vibrate(NaN); - } catch(e) { - assert_unreached('error message: ' + e.message); - } - }, 'pattern of NaN resolves to [NaN]'); - - test(function() { - try { - navigator.vibrate({}); - } catch(e) { - assert_unreached('error message: ' + e.message); - } - }, 'pattern of {} resolves to [{}]'); -</script> - diff --git a/testing/web-platform/tests/vibration/pattern-array-extra-manual.html b/testing/web-platform/tests/vibration/pattern-array-extra-manual.html deleted file mode 100644 index 3f5ccf386..000000000 --- a/testing/web-platform/tests/vibration/pattern-array-extra-manual.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: test a pattern array parameter to vibrate() with an extra (even) item</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom, interact'/> - <meta name='assert' content='If the length of pattern is even, then remove the last entry in pattern.'/> - </head> - <body> - <h1>Description</h1> - <p> - After hitting the button below, your device must vibrate three times for one second, separated - by one second intervals. - </p> - <button id='vib'>Vibrate!</button> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - if (undefined !== navigator.vibrate) { - document.getElementById("vib").onclick = function () { - navigator.vibrate([1000, 1000, 1000, 1000, 1000, 1000]); - }; - } - </script> - </body> -</html> diff --git a/testing/web-platform/tests/vibration/pattern-array-manual.html b/testing/web-platform/tests/vibration/pattern-array-manual.html deleted file mode 100644 index 43674bf8c..000000000 --- a/testing/web-platform/tests/vibration/pattern-array-manual.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: test a pattern array parameter to vibrate()</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom, interact'/> - </head> - <body> - <h1>Description</h1> - <p> - After hitting the button below, your device must vibrate three times for one second, separated - by one second intervals. - </p> - <button id='vib'>Vibrate!</button> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - if (undefined !== navigator.vibrate) { - document.getElementById("vib").onclick = function () { - navigator.vibrate([1000, 1000, 1000, 1000, 1000]); - }; - } - </script> - </body> -</html> 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 deleted file mode 100644 index dff2f1ed7..000000000 --- a/testing/web-platform/tests/vibration/pattern-array-with-0-manual.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<meta charset='utf-8'> -<title>Vibration API: test a pattern array with 0ms vibration and still to vibrate()</title> -<link rel='author' title='Intel' href='http://www.intel.com'> -<link rel='help' href='http://dev.w3.org/2009/dap/vibration/#vibration-interface'> -<meta name='flags' content='interact'> -<style> - button { - height: 100px; - width: 100px; - } -</style> - -<h1>Description</h1> -<p> - After hitting the button below, your device must vibrate continuously for about two seconds, once. -</p> -<button id='vib'>Vibrate!</button> -<div id='log'></div> -<script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> -<script> - document.getElementById("vib").onclick = function () { - navigator.vibrate([0, 0, 2000]); - }; -</script> - diff --git a/testing/web-platform/tests/vibration/silent-ignore.html b/testing/web-platform/tests/vibration/silent-ignore.html deleted file mode 100644 index c7447df51..000000000 --- a/testing/web-platform/tests/vibration/silent-ignore.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: test that calls to vibrate() are silently ignored when the device cannot vibrate</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom, no-vibrator'/> - <meta name='assert' content='If the device does not provide a vibration mechanism, or it is disabled, the user agent must silently ignore any invocations of the vibrate() method.'/> - </head> - <body> - <h1>Description</h1> - <p> - <strong>This test is only useful on devices that do not have vibration capability</strong>. - If your device supports vibration, then <strong>skip</strong> 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). - </p> - <div id='log'></div> - <script src='/resources/testharness.js'></script> - <script src='/resources/testharnessreport.js'></script> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - if (undefined !== navigator.vibrate) { - test(function () { - assert_true(navigator.vibrate(1000), "vibrate() returns true when vibration is not supported"); - }, "Calling vibrate returns true"); - } - </script> - </body> -</html> diff --git a/testing/web-platform/tests/vibration/simple-array-manual.html b/testing/web-platform/tests/vibration/simple-array-manual.html deleted file mode 100644 index 4a85bd6ad..000000000 --- a/testing/web-platform/tests/vibration/simple-array-manual.html +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: test a simple array parameter to vibrate()</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - </head> - <body> - <h1>Description</h1> - <p> - After hitting the button below, your device must vibrate continuously for about two seconds, once. - </p> - <button id='vib'>Vibrate!</button> - <div id='log'></div> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - document.getElementById("vib").onclick = function () { - navigator.vibrate([2000]); - }; - </script> - </body> -</html> diff --git a/testing/web-platform/tests/vibration/simple-scalar-manual.html b/testing/web-platform/tests/vibration/simple-scalar-manual.html deleted file mode 100644 index 0c7637bba..000000000 --- a/testing/web-platform/tests/vibration/simple-scalar-manual.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'/> - <title>Vibration API: test a simple scalar parameter to vibrate()</title> - <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/> - <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/> - <meta name='flags' content='dom, interact'/> - </head> - <body> - <h1>Description</h1> - <p> - After hitting the button below, your device must vibrate continuously for about two seconds, once. - </p> - <button id='vib'>Vibrate!</button> - <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> - <script> - if (undefined !== navigator.vibrate) { - document.getElementById("vib").onclick = function () { - navigator.vibrate(2000); - }; - } - </script> - </body> -</html> |