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

Unified Diff: third_party/WebKit/LayoutTests/vibration/vibration.html

Issue 2778693004: Remove navigator.vibrate without user gesture. (Closed)
Patch Set: reformat again! 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.html
diff --git a/third_party/WebKit/LayoutTests/vibration/vibration.html b/third_party/WebKit/LayoutTests/vibration/vibration.html
index 1dfcde4e5c3ecec5805f1eb368d1f31e11daad9e..86ab80c55aeefeec24f37fd825c65140e0e00198 100644
--- a/third_party/WebKit/LayoutTests/vibration/vibration.html
+++ b/third_party/WebKit/LayoutTests/vibration/vibration.html
@@ -2,7 +2,10 @@
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../resources/mojo-helpers.js"></script>
+<script src="../resources/user-gesture-utils.js"></script>
<script src="resources/vibration-helpers.js"></script>
+<script src="vibration-utils.js"></script>
+<h4 id="test"></h4>
<script>
'use strict';
@@ -10,6 +13,10 @@
if (!window.testRunner)
debug('This test cannot be run without the TestRunner');
+// Simulates a user click for vibrate to be allowed.
+// See: https://www.chromestatus.com/feature/5644273861001216.
+simulateUserClick("test");
+
vibration_test(vibration => {
assert_true(vibration instanceof Object);
assert_true(vibration.mockVibrationManager instanceof Object);

Powered by Google App Engine
This is Rietveld 408576698