Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: third_party/WebKit/LayoutTests/vibration/vibration-page-visibility.html

Issue 2778693004: Remove navigator.vibrate without user gesture. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/vibration/vibration-page-visibility.html
diff --git a/third_party/WebKit/LayoutTests/vibration/vibration-page-visibility.html b/third_party/WebKit/LayoutTests/vibration/vibration-page-visibility.html
index 88afbbef6ad9b2796d1c6e0ed211d78ebb821e46..e79d93cd5673011027328d7c864c80daa316ba41 100644
--- a/third_party/WebKit/LayoutTests/vibration/vibration-page-visibility.html
+++ b/third_party/WebKit/LayoutTests/vibration/vibration-page-visibility.html
@@ -1,8 +1,14 @@
<!DOCTYPE html>
+<h4 id="test"></h4>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
+<script src="../resources/user-gesture-utils.js"></script>
+<script src="vibration-utils.js"></script>
<script>
'use strict';
+// Simulates a user click for vibrate to be allowed.
+var element = document.getElementById("test");
+simulateUserClick(element.offsetLeft + 2, element.offsetTop + 2);
test(() => {
// Initially the page is hidden and no vibration can be started.

Powered by Google App Engine
This is Rietveld 408576698