Index: third_party/WebKit/LayoutTests/vibration/cancel-vibration-during-pattern-vibrating.html |
diff --git a/third_party/WebKit/LayoutTests/vibration/cancel-vibration-during-pattern-vibrating.html b/third_party/WebKit/LayoutTests/vibration/cancel-vibration-during-pattern-vibrating.html |
index d41c40549a53efe0ce8a11beb23b23e9423e35aa..812306e4616238384a2449f004893ccfff5281da 100644 |
--- a/third_party/WebKit/LayoutTests/vibration/cancel-vibration-during-pattern-vibrating.html |
+++ b/third_party/WebKit/LayoutTests/vibration/cancel-vibration-during-pattern-vibrating.html |
@@ -1,11 +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 the cancelVibration during pattern vibration is working.'); |
+// Simulates a user click for vibrate to be allowed. |
+var element = document.getElementById("test"); |
+simulateUserClick(element.offsetLeft + 2, element.offsetTop + 2); |
+ |
function vibrate(pattern) { |
navigator.vibrate(pattern); |
shouldBeTrue('internals.isVibrating(navigator)'); |
@@ -60,4 +67,4 @@ if (window.testRunner) { |
} |
</script> |
</body> |
-</html> |
+</html> |