Index: third_party/WebKit/LayoutTests/vibration/vibration-patterns.html |
diff --git a/third_party/WebKit/LayoutTests/vibration/vibration-patterns.html b/third_party/WebKit/LayoutTests/vibration/vibration-patterns.html |
index ca254ea8a17ca655f852b45b6328d74ec9848224..f35b76d7fdbedadca89cd6e82bef801b8b8ac766 100644 |
--- a/third_party/WebKit/LayoutTests/vibration/vibration-patterns.html |
+++ b/third_party/WebKit/LayoutTests/vibration/vibration-patterns.html |
@@ -1,12 +1,18 @@ |
<html> |
<head> |
<script src="../resources/js-test.js"></script> |
+<script src="../resources/user-gesture-utils.js"></script> |
<script src="vibration-utils.js"></script> |
</head> |
<body> |
+<h4 id="test"></h4> |
<script> |
description('Tests for how patterns are handled in the Vibration API.'); |
+// Simulates a user click for vibrate to be allowed. |
+// See: https://www.chromestatus.com/feature/5644273861001216. |
+simulateUserClick("test"); |
+ |
// A trailing pause is discarded from a pattern i.e. patterns of even |
// non-zero length are truncated by 1. |
shouldBeTrue("navigator.vibrate(newPattern(1, 4))"); |