blob: 4a53ad6c9708dd488f2d166c8fb1dd575c186f12 [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 that the vibrate() method is present (with or without vendor prefix)</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'/>
9 <meta name='assert' content='Check that the vibrate() method is present.'/>
10 <!--
11 When you review this test, please add
12 <link rel='reviewer' title='Your Name' href='mailto:your-email-address'/>
13 -->
Dominique Hazael-Massieux4ead9a62013-05-30 12:33:3714 <link rel='stylesheet' href='/resources/testharness.css' media='all'/>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4015 </head>
16 <body>
17 <h1>Description</h1>
18 <p>
19 This test checks for the presence of the <code>vibrate()</code> method, taking
20 vendor prefixes into account.
21 </p>
22 <div id='log'></div>
Dominique Hazael-Massieux4ead9a62013-05-30 12:33:3723 <script src='/resources/testharness.js'></script>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4024 <!-- When this test gets approved, remove a "../" below -->
25 <script src='support/feature-detection.js'></script>
26 <script>
27 test(function () {
28 assert_true(undefined !== BrowserHasFeature(navigator, "vibrate"), "navigator.vibrate exists");
29 }, "vibrate() is present on navigator");
30 </script>
31 </body>
32</html>