From a167facb42642c248c486d28f4701d88b43c76a9 Mon Sep 17 00:00:00 2001 From: Fedor Date: Thu, 26 Nov 2020 23:50:40 +0200 Subject: [PATCH] Remove vibrator DOM interface and support code. --- config/system-headers | 1 - dom/base/Navigator.cpp | 193 +----------------- dom/base/Navigator.h | 3 - dom/tests/mochitest/general/mochitest.ini | 1 - .../mochitest/general/test_vibrator.html | 93 --------- dom/webidl/Navigator.webidl | 25 +-- hal/Hal.cpp | 79 ------- hal/Hal.h | 35 ---- hal/fallback/FallbackVibration.cpp | 22 -- hal/moz.build | 5 - hal/sandbox/PHal.ipdl | 3 - hal/sandbox/SandboxHal.cpp | 52 ----- modules/libpref/init/all.js | 4 - testing/web-platform/tests/vibration/OWNERS | 3 - .../tests/vibration/api-is-present.html | 27 --- .../vibration/cancel-when-hidden-manual.html | 38 ---- .../tests/vibration/cancel-with-0-manual.html | 31 --- .../vibration/cancel-with-array-0-manual.html | 33 --- .../cancel-with-empty-array-manual.html | 31 --- .../vibration/cancel-with-new-manual.html | 32 --- testing/web-platform/tests/vibration/idl.html | 23 --- .../tests/vibration/invalid-values.html | 79 ------- .../vibration/pattern-array-extra-manual.html | 27 --- .../tests/vibration/pattern-array-manual.html | 26 --- .../pattern-array-with-0-manual.html | 26 --- .../tests/vibration/silent-ignore.html | 31 --- .../tests/vibration/simple-array-manual.html | 23 --- .../tests/vibration/simple-scalar-manual.html | 25 --- 28 files changed, 4 insertions(+), 967 deletions(-) delete mode 100644 dom/tests/mochitest/general/test_vibrator.html delete mode 100644 hal/fallback/FallbackVibration.cpp delete mode 100644 testing/web-platform/tests/vibration/OWNERS delete mode 100644 testing/web-platform/tests/vibration/api-is-present.html delete mode 100644 testing/web-platform/tests/vibration/cancel-when-hidden-manual.html delete mode 100644 testing/web-platform/tests/vibration/cancel-with-0-manual.html delete mode 100644 testing/web-platform/tests/vibration/cancel-with-array-0-manual.html delete mode 100644 testing/web-platform/tests/vibration/cancel-with-empty-array-manual.html delete mode 100644 testing/web-platform/tests/vibration/cancel-with-new-manual.html delete mode 100644 testing/web-platform/tests/vibration/idl.html delete mode 100644 testing/web-platform/tests/vibration/invalid-values.html delete mode 100644 testing/web-platform/tests/vibration/pattern-array-extra-manual.html delete mode 100644 testing/web-platform/tests/vibration/pattern-array-manual.html delete mode 100644 testing/web-platform/tests/vibration/pattern-array-with-0-manual.html delete mode 100644 testing/web-platform/tests/vibration/silent-ignore.html delete mode 100644 testing/web-platform/tests/vibration/simple-array-manual.html delete mode 100644 testing/web-platform/tests/vibration/simple-scalar-manual.html diff --git a/config/system-headers b/config/system-headers index 3685d6d1c..015644428 100644 --- a/config/system-headers +++ b/config/system-headers @@ -526,7 +526,6 @@ hardware/lights.h hardware/power.h hardware_legacy/power.h hardware_legacy/uevent.h -hardware_legacy/vibrator.h #endif HIToolbox/HIToolbox.h hlink.h diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 26fb16e4c..c0580c359 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -97,11 +97,6 @@ namespace mozilla { namespace dom { -static bool sVibratorEnabled = false; -static uint32_t sMaxVibrateMS = 0; -static uint32_t sMaxVibrateListLen = 0; -static const char* kVibrationPermissionType = "vibration"; - static void AddPermission(nsIPrincipal* aPrincipal, const char* aType, uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime) @@ -152,12 +147,7 @@ GetPermission(nsIPrincipal* aPrincipal, const char* aType) void Navigator::Init() { - Preferences::AddBoolVarCache(&sVibratorEnabled, - "dom.vibrator.enabled", true); - Preferences::AddUintVarCache(&sMaxVibrateMS, - "dom.vibrator.max_vibrate_ms", 10000); - Preferences::AddUintVarCache(&sMaxVibrateListLen, - "dom.vibrator.max_vibrate_list_len", 128); + // Add any Preferences::Add*VarCache(&sPref, "pref", default) here if needed. } Navigator::Navigator(nsPIDOMWindowInner* aWindow) @@ -705,82 +695,6 @@ Navigator::RefreshMIMEArray() } } -namespace { - -class VibrateWindowListener : public nsIDOMEventListener -{ -public: - VibrateWindowListener(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument) - { - mWindow = do_GetWeakReference(aWindow); - mDocument = do_GetWeakReference(aDocument); - - NS_NAMED_LITERAL_STRING(visibilitychange, "visibilitychange"); - aDocument->AddSystemEventListener(visibilitychange, - this, /* listener */ - true, /* use capture */ - false /* wants untrusted */); - } - - void RemoveListener(); - - NS_DECL_ISUPPORTS - NS_DECL_NSIDOMEVENTLISTENER - -private: - virtual ~VibrateWindowListener() - { - } - - nsWeakPtr mWindow; - nsWeakPtr mDocument; -}; - -NS_IMPL_ISUPPORTS(VibrateWindowListener, nsIDOMEventListener) - -StaticRefPtr gVibrateWindowListener; - -static bool -MayVibrate(nsIDocument* doc) { - // Hidden documents cannot start or stop a vibration. - return (doc && !doc->Hidden()); -} - -NS_IMETHODIMP -VibrateWindowListener::HandleEvent(nsIDOMEvent* aEvent) -{ - nsCOMPtr doc = - do_QueryInterface(aEvent->InternalDOMEvent()->GetTarget()); - - if (!MayVibrate(doc)) { - // It's important that we call CancelVibrate(), not Vibrate() with an - // empty list, because Vibrate() will fail if we're no longer focused, but - // CancelVibrate() will succeed, so long as nobody else has started a new - // vibration pattern. - nsCOMPtr window = do_QueryReferent(mWindow); - hal::CancelVibrate(window); - RemoveListener(); - gVibrateWindowListener = nullptr; - // Careful: The line above might have deleted |this|! - } - - return NS_OK; -} - -void -VibrateWindowListener::RemoveListener() -{ - nsCOMPtr target = do_QueryReferent(mDocument); - if (!target) { - return; - } - NS_NAMED_LITERAL_STRING(visibilitychange, "visibilitychange"); - target->RemoveSystemEventListener(visibilitychange, this, - true /* use capture */); -} - -} // namespace - void Navigator::AddIdleObserver(MozIdleObserver& aIdleObserver, ErrorResult& aRv) { @@ -809,111 +723,6 @@ Navigator::RemoveIdleObserver(MozIdleObserver& aIdleObserver, ErrorResult& aRv) } } -void -Navigator::SetVibrationPermission(bool aPermitted, bool aPersistent) -{ - MOZ_ASSERT(NS_IsMainThread()); - - nsTArray pattern; - pattern.SwapElements(mRequestedVibrationPattern); - - if (!mWindow) { - return; - } - - nsCOMPtr doc = mWindow->GetExtantDoc(); - - if (!MayVibrate(doc)) { - return; - } - - if (aPermitted) { - // Add a listener to cancel the vibration if the document becomes hidden, - // and remove the old visibility listener, if there was one. - if (!gVibrateWindowListener) { - // If gVibrateWindowListener is null, this is the first time we've vibrated, - // and we need to register a listener to clear gVibrateWindowListener on - // shutdown. - ClearOnShutdown(&gVibrateWindowListener); - } else { - gVibrateWindowListener->RemoveListener(); - } - gVibrateWindowListener = new VibrateWindowListener(mWindow, doc); - hal::Vibrate(pattern, mWindow); - } - - if (aPersistent) { - AddPermission(doc->NodePrincipal(), kVibrationPermissionType, - aPermitted ? nsIPermissionManager::ALLOW_ACTION : - nsIPermissionManager::DENY_ACTION, - nsIPermissionManager::EXPIRE_SESSION, 0); - } -} - -bool -Navigator::Vibrate(uint32_t aDuration) -{ - AutoTArray pattern; - pattern.AppendElement(aDuration); - return Vibrate(pattern); -} - -bool -Navigator::Vibrate(const nsTArray& aPattern) -{ - MOZ_ASSERT(NS_IsMainThread()); - - if (!mWindow) { - return false; - } - - nsCOMPtr doc = mWindow->GetExtantDoc(); - - if (!MayVibrate(doc)) { - return false; - } - - nsTArray pattern(aPattern); - - if (pattern.Length() > sMaxVibrateListLen) { - pattern.SetLength(sMaxVibrateListLen); - } - - for (size_t i = 0; i < pattern.Length(); ++i) { - pattern[i] = std::min(sMaxVibrateMS, pattern[i]); - } - - // The spec says we check sVibratorEnabled after we've done the sanity - // checking on the pattern. - if (!sVibratorEnabled) { - return true; - } - - mRequestedVibrationPattern.SwapElements(pattern); - uint32_t permission = GetPermission(mWindow, kVibrationPermissionType); - - if (permission == nsIPermissionManager::ALLOW_ACTION || - mRequestedVibrationPattern.IsEmpty() || - (mRequestedVibrationPattern.Length() == 1 && - mRequestedVibrationPattern[0] == 0)) { - // Always allow cancelling vibration and respect session permissions. - SetVibrationPermission(true /* permitted */, false /* persistent */); - return true; - } - - nsCOMPtr obs = services::GetObserverService(); - if (!obs || permission == nsIPermissionManager::DENY_ACTION) { - // Abort without observer service or on denied session permission. - SetVibrationPermission(false /* permitted */, false /* persistent */); - return true; - } - - // Request user permission. - obs->NotifyObservers(ToSupports(this), "Vibration:Request", nullptr); - - return true; -} - //***************************************************************************** // Pointer Events interface //***************************************************************************** diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h index 1e5575c05..df99844ca 100644 --- a/dom/base/Navigator.h +++ b/dom/base/Navigator.h @@ -149,9 +149,6 @@ public: // NavigatorBinding::ClearCachedUserAgentValue(this); void ClearUserAgentCache(); - bool Vibrate(uint32_t aDuration); - bool Vibrate(const nsTArray& aDuration); - void SetVibrationPermission(bool aPermitted, bool aPersistent); uint32_t MaxTouchPoints(); void GetAppCodeName(nsString& aAppCodeName, ErrorResult& aRv) { diff --git a/dom/tests/mochitest/general/mochitest.ini b/dom/tests/mochitest/general/mochitest.ini index 9f2fad785..67c35f01a 100644 --- a/dom/tests/mochitest/general/mochitest.ini +++ b/dom/tests/mochitest/general/mochitest.ini @@ -122,7 +122,6 @@ run-if = e10s [test_storagePermissionsReject.html] [test_storagePermissionsRejectForeign.html] [test_stylesheetPI.html] -[test_vibrator.html] [test_WebKitCSSMatrix.html] [test_windowedhistoryframes.html] [test_windowProperties.html] diff --git a/dom/tests/mochitest/general/test_vibrator.html b/dom/tests/mochitest/general/test_vibrator.html deleted file mode 100644 index 2874c783b..000000000 --- a/dom/tests/mochitest/general/test_vibrator.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Test for Vibrator - - - - - - - - - - - - diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl index f34429de7..43d53cbac 100644 --- a/dom/webidl/Navigator.webidl +++ b/dom/webidl/Navigator.webidl @@ -13,9 +13,9 @@ * http://www.w3.org/TR/beacon/#sec-beacon-method * https://html.spec.whatwg.org/#navigatorconcurrenthardware * - * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and - * Opera Software ASA. You are granted a license to use, reproduce - * and create derivative works of this document. + * © Copyright 2004-2020 Apple Computer, Inc., Mozilla Foundation, + * Opera Software ASA and Moonchild Productions. You are granted a license to use, + * reproduce and create derivative works of this document. */ // http://www.whatwg.org/specs/web-apps/current-work/#the-navigator-object @@ -124,14 +124,6 @@ interface NavigatorGeolocation { }; Navigator implements NavigatorGeolocation; -// http://www.w3.org/TR/vibration/#vibration-interface -partial interface Navigator { - // We don't support sequences in unions yet - //boolean vibrate ((unsigned long or sequence) pattern); - boolean vibrate(unsigned long duration); - boolean vibrate(sequence pattern); -}; - // http://www.w3.org/TR/pointerevents/#extensions-to-the-navigator-interface partial interface Navigator { [Pref="dom.w3c_pointer_events.enabled"] @@ -140,17 +132,6 @@ partial interface Navigator { // Mozilla-specific extensions -// Chrome-only interface for Vibration API permission handling. -partial interface Navigator { - /* Set permission state to device vibration. - * @param permitted permission state (true for allowing vibration) - * @param persistent make the permission session-persistent - */ - [ChromeOnly] - void setVibrationPermission(boolean permitted, - optional boolean persistent = true); -}; - callback interface MozIdleObserver { // Time is in seconds and is read only when idle observers are added // and removed. diff --git a/hal/Hal.cpp b/hal/Hal.cpp index f0167f575..88c1fa50b 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -94,87 +94,8 @@ WindowIsActive(nsPIDOMWindowInner* aWindow) return !document->Hidden(); } -StaticAutoPtr gLastIDToVibrate; - -void InitLastIDToVibrate() -{ - gLastIDToVibrate = new WindowIdentifier::IDArrayType(); - ClearOnShutdown(&gLastIDToVibrate); -} - } // namespace -void -Vibrate(const nsTArray& pattern, nsPIDOMWindowInner* window) -{ - Vibrate(pattern, WindowIdentifier(window)); -} - -void -Vibrate(const nsTArray& pattern, const WindowIdentifier &id) -{ - AssertMainThread(); - - // Only active windows may start vibrations. If |id| hasn't gone - // through the IPC layer -- that is, if our caller is the outside - // world, not hal_proxy -- check whether the window is active. If - // |id| has gone through IPC, don't check the window's visibility; - // only the window corresponding to the bottommost process has its - // visibility state set correctly. - if (!id.HasTraveledThroughIPC() && !WindowIsActive(id.GetWindow())) { - HAL_LOG("Vibrate: Window is inactive, dropping vibrate."); - return; - } - - if (!InSandbox()) { - if (!gLastIDToVibrate) { - InitLastIDToVibrate(); - } - *gLastIDToVibrate = id.AsArray(); - } - - // Don't forward our ID if we are not in the sandbox, because hal_impl - // doesn't need it, and we don't want it to be tempted to read it. The - // empty identifier will assert if it's used. - PROXY_IF_SANDBOXED(Vibrate(pattern, InSandbox() ? id : WindowIdentifier())); -} - -void -CancelVibrate(nsPIDOMWindowInner* window) -{ - CancelVibrate(WindowIdentifier(window)); -} - -void -CancelVibrate(const WindowIdentifier &id) -{ - AssertMainThread(); - - // Although only active windows may start vibrations, a window may - // cancel its own vibration even if it's no longer active. - // - // After a window is marked as inactive, it sends a CancelVibrate - // request. We want this request to cancel a playing vibration - // started by that window, so we certainly don't want to reject the - // cancellation request because the window is now inactive. - // - // But it could be the case that, after this window became inactive, - // some other window came along and started a vibration. We don't - // want this window's cancellation request to cancel that window's - // actively-playing vibration! - // - // To solve this problem, we keep track of the id of the last window - // to start a vibration, and only accepts cancellation requests from - // the same window. All other cancellation requests are ignored. - - if (InSandbox() || (gLastIDToVibrate && *gLastIDToVibrate == id.AsArray())) { - // Don't forward our ID if we are not in the sandbox, because hal_impl - // doesn't need it, and we don't want it to be tempted to read it. The - // empty identifier will assert if it's used. - PROXY_IF_SANDBOXED(CancelVibrate(InSandbox() ? id : WindowIdentifier())); - } -} - template class ObserversManager { diff --git a/hal/Hal.h b/hal/Hal.h index e2e571790..ced295ca4 100644 --- a/hal/Hal.h +++ b/hal/Hal.h @@ -50,41 +50,6 @@ typedef Observer SystemTimezoneChangeObserver; namespace MOZ_HAL_NAMESPACE { -/** - * Turn the default vibrator device on/off per the pattern specified - * by |pattern|. Each element in the pattern is the number of - * milliseconds to turn the vibrator on or off. The first element in - * |pattern| is an "on" element, the next is "off", and so on. - * - * If |pattern| is empty, any in-progress vibration is canceled. - * - * Only an active window within an active tab may call Vibrate; calls - * from inactive windows and windows on inactive tabs do nothing. - * - * If you're calling hal::Vibrate from the outside world, pass an - * nsIDOMWindow* in place of the WindowIdentifier parameter. - * The method with WindowIdentifier will be called automatically. - */ -void Vibrate(const nsTArray& pattern, - nsPIDOMWindowInner* aWindow); -void Vibrate(const nsTArray& pattern, - const hal::WindowIdentifier &id); - -/** - * Cancel a vibration started by the content window identified by - * WindowIdentifier. - * - * If the window was the last window to start a vibration, the - * cancellation request will go through even if the window is not - * active. - * - * As with hal::Vibrate(), if you're calling hal::CancelVibrate from the outside - * world, pass an nsIDOMWindow*. The method with WindowIdentifier will be called - * automatically. - */ -void CancelVibrate(nsPIDOMWindowInner* aWindow); -void CancelVibrate(const hal::WindowIdentifier &id); - /** * Determine whether the device's screen is currently enabled. */ diff --git a/hal/fallback/FallbackVibration.cpp b/hal/fallback/FallbackVibration.cpp deleted file mode 100644 index 57379646d..000000000 --- a/hal/fallback/FallbackVibration.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "Hal.h" - -using mozilla::hal::WindowIdentifier; - -namespace mozilla { -namespace hal_impl { - -void -Vibrate(const nsTArray& pattern, const hal::WindowIdentifier &) -{} - -void -CancelVibrate(const hal::WindowIdentifier &) -{} - -} // namespace hal_impl -} // namespace mozilla diff --git a/hal/moz.build b/hal/moz.build index 4c94473fb..1ca9a6d02 100644 --- a/hal/moz.build +++ b/hal/moz.build @@ -43,7 +43,6 @@ elif CONFIG['OS_TARGET'] == 'Linux': 'fallback/FallbackAlarm.cpp', 'fallback/FallbackScreenConfiguration.cpp', 'fallback/FallbackSensor.cpp', - 'fallback/FallbackVibration.cpp', 'linux/LinuxMemory.cpp', 'linux/LinuxPower.cpp', ] @@ -53,7 +52,6 @@ elif CONFIG['OS_TARGET'] == 'WINNT': 'fallback/FallbackMemory.cpp', 'fallback/FallbackPower.cpp', 'fallback/FallbackScreenConfiguration.cpp', - 'fallback/FallbackVibration.cpp', 'windows/WindowsSensor.cpp', ] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': @@ -62,7 +60,6 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 'fallback/FallbackMemory.cpp', 'fallback/FallbackPower.cpp', 'fallback/FallbackScreenConfiguration.cpp', - 'fallback/FallbackVibration.cpp', ] elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'): UNIFIED_SOURCES += [ @@ -71,7 +68,6 @@ elif CONFIG['OS_TARGET'] in ('OpenBSD', 'NetBSD', 'FreeBSD', 'DragonFly'): 'fallback/FallbackPower.cpp', 'fallback/FallbackScreenConfiguration.cpp', 'fallback/FallbackSensor.cpp', - 'fallback/FallbackVibration.cpp', ] else: UNIFIED_SOURCES += [ @@ -80,7 +76,6 @@ else: 'fallback/FallbackPower.cpp', 'fallback/FallbackScreenConfiguration.cpp', 'fallback/FallbackSensor.cpp', - 'fallback/FallbackVibration.cpp', ] UNIFIED_SOURCES += [ diff --git a/hal/sandbox/PHal.ipdl b/hal/sandbox/PHal.ipdl index cfd021c10..5fa2b2b97 100644 --- a/hal/sandbox/PHal.ipdl +++ b/hal/sandbox/PHal.ipdl @@ -69,9 +69,6 @@ child: async NotifySystemTimezoneChange(SystemTimezoneChangeInformation aSystemTimezoneChangeInfo); parent: - async Vibrate(uint32_t[] pattern, uint64_t[] id, PBrowser browser); - async CancelVibrate(uint64_t[] id, PBrowser browser); - async EnableNetworkNotifications(); async DisableNetworkNotifications(); sync GetCurrentNetworkInformation() diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp index fd84f7c39..9a214f085 100644 --- a/hal/sandbox/SandboxHal.cpp +++ b/hal/sandbox/SandboxHal.cpp @@ -45,28 +45,6 @@ Hal() return sHal; } -void -Vibrate(const nsTArray& pattern, const WindowIdentifier &id) -{ - HAL_LOG("Vibrate: Sending to parent process."); - - AutoTArray p(pattern); - - WindowIdentifier newID(id); - newID.AppendProcessID(); - Hal()->SendVibrate(p, newID.AsArray(), TabChild::GetFrom(newID.GetWindow())); -} - -void -CancelVibrate(const WindowIdentifier &id) -{ - HAL_LOG("CancelVibrate: Sending to parent process."); - - WindowIdentifier newID(id); - newID.AppendProcessID(); - Hal()->SendCancelVibrate(newID.AsArray(), TabChild::GetFrom(newID.GetWindow())); -} - void EnableNetworkNotifications() { @@ -379,36 +357,6 @@ public: hal::UnregisterSystemTimezoneChangeObserver(this); } - virtual bool - RecvVibrate(InfallibleTArray&& pattern, - InfallibleTArray&& id, - PBrowserParent *browserParent) override - { - // We give all content vibration permission. - // TabParent *tabParent = TabParent::GetFrom(browserParent); - /* xxxkhuey wtf - nsCOMPtr window = - do_QueryInterface(tabParent->GetBrowserDOMWindow()); - */ - WindowIdentifier newID(id, nullptr); - hal::Vibrate(pattern, newID); - return true; - } - - virtual bool - RecvCancelVibrate(InfallibleTArray &&id, - PBrowserParent *browserParent) override - { - //TabParent *tabParent = TabParent::GetFrom(browserParent); - /* XXXkhuey wtf - nsCOMPtr window = - tabParent->GetBrowserDOMWindow(); - */ - WindowIdentifier newID(id, nullptr); - hal::CancelVibrate(newID); - return true; - } - virtual bool RecvEnableNetworkNotifications() override { // We give all content access to this network-status information. diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index ceb27ede9..287924802 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -4751,10 +4751,6 @@ pref("dom.event.handling-user-input-time-limit", 1000); // Whether we should layerize all animated images (if otherwise possible). pref("layout.animated-image-layers.enabled", false); -pref("dom.vibrator.enabled", true); -pref("dom.vibrator.max_vibrate_ms", 10000); -pref("dom.vibrator.max_vibrate_list_len", 128); - // Abort API pref("dom.abortController.enabled", true); 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 @@ - - - - - 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 deleted file mode 100644 index 569970758..000000000 --- a/testing/web-platform/tests/vibration/cancel-when-hidden-manual.html +++ /dev/null @@ -1,38 +0,0 @@ - - -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 deleted file mode 100644 index 6890d5764..000000000 --- a/testing/web-platform/tests/vibration/cancel-with-0-manual.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - 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 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 @@ - - -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 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 @@ - - - - - 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 deleted file mode 100644 index 1cd9daf17..000000000 --- a/testing/web-platform/tests/vibration/cancel-with-new-manual.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 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/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 @@ - - -IDL harness tests for Vibration API - -

Description

-

- This test validates the IDL defined by the Vibration API. -

-

- This test uses idlharness.js -

-
- - - - - 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 @@ - - -Vibration API: vibrate(invalid) - - - -

Description

-

- This test checks the vibrate() method with invalid parameter, - taking vendor prefixes into account. -

-
- - - - - 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 @@ - - - - - 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 deleted file mode 100644 index 43674bf8c..000000000 --- a/testing/web-platform/tests/vibration/pattern-array-manual.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - 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 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 @@ - - -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 deleted file mode 100644 index c7447df51..000000000 --- a/testing/web-platform/tests/vibration/silent-ignore.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - 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 deleted file mode 100644 index 4a85bd6ad..000000000 --- a/testing/web-platform/tests/vibration/simple-array-manual.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - 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 deleted file mode 100644 index 0c7637bba..000000000 --- a/testing/web-platform/tests/vibration/simple-scalar-manual.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - 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. -

- - - - -