blob: 3245bc6c0dceec292c85d68bfcfc81e3c6c829ea [file] [log] [blame]
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:401<!DOCTYPE html>
2<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
3 <head>
4 <meta charset='utf-8'/>
5 <title>Vibration API: test a pattern array parameter to vibrate() with an extra (even) item</title>
6 <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/>
7 <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/>
8 <meta name='flags' content='vendor-prefix, dom, interact'/>
9 <meta name='assert' content='If the length of pattern is even, then remove the last entry in pattern.'/>
10 <!--
11 When you review this test, please add
12 <link rel='reviewer' title='Your Name' href='mailto:your-email-address'/>
13 -->
14 <link rel='stylesheet' href='http://w3c-test.org/resources/testharness.css' media='all'/>
15 </head>
16 <body>
17 <h1>Description</h1>
18 <p>
19 After hitting the button below, your device must vibrate three times for one second, separated
20 by one second intervals.
21 </p>
22 <button id='vib'>Vibrate!</button>
23 <div id='log'></div>
24 <script src='http://w3c-test.org/resources/testharness.js'></script>
25 <!-- When this test gets approved, remove a "../" below -->
26 <script src='support/feature-detection.js'></script>
27 <script src='support/helpers.js'></script>
28 <script>
29 if (supportsVibration()) {
30 document.getElementById("vib").onclick = function () {
31 navigator.vibrate([1000, 1000, 1000, 1000, 1000, 1000]);
32 };
33 }
34 </script>
35 </body>
36</html>