Index: third_party/WebKit/LayoutTests/vibration/vibration-exceptions.html |
diff --git a/third_party/WebKit/LayoutTests/vibration/vibration-exceptions.html b/third_party/WebKit/LayoutTests/vibration/vibration-exceptions.html |
index ee16c08ea9b7958fec472fb8b58f34fad2f61c15..183669b7a226d4aa3d183f636529252e436ef307 100644 |
--- a/third_party/WebKit/LayoutTests/vibration/vibration-exceptions.html |
+++ b/third_party/WebKit/LayoutTests/vibration/vibration-exceptions.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 that bad input throws exceptions in the Vibration API.'); |
+// Simulates a user click for vibrate to be allowed. |
+// See: https://www.chromestatus.com/feature/5644273861001216. |
+simulateUserClick("test"); |
+ |
shouldThrow("navigator.vibrate()"); |
shouldBe("navigator.vibrate(1, 2)", "true"); |
shouldBe("navigator.vibrate([1], [2])", "true"); |