blob: 8dde96c2b8c3b866077a767409856f123661e578 [file] [log] [blame]
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:401<!DOCTYPE html>
Zhiqiang Zhang2f202f42014-06-24 14:28:532<html>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:403 <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'/>
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:208 <meta name='flags' content='dom'/>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:409 <meta name='assert' content='Check that the vibrate() method is present.'/>
Dominique Hazael-Massieux4ead9a62013-05-30 12:33:3710 <link rel='stylesheet' href='/resources/testharness.css' media='all'/>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4011 </head>
12 <body>
13 <h1>Description</h1>
14 <p>
15 This test checks for the presence of the <code>vibrate()</code> method, taking
16 vendor prefixes into account.
17 </p>
18 <div id='log'></div>
Dominique Hazael-Massieux4ead9a62013-05-30 12:33:3719 <script src='/resources/testharness.js'></script>
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:2020 <script src='/resources/testharnessreport.js'></script>
21 <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4022 <script>
23 test(function () {
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:2024 assert_true(undefined !== navigator.vibrate, "navigator.vibrate exists");
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4025 }, "vibrate() is present on navigator");
26 </script>
27 </body>
28</html>