| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 1 | <!DOCTYPE html> |
| Zhiqiang Zhang | 2f202f4 | 2014-06-24 14:28:53 | [diff] [blame] | 2 | <html> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 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'/> |
| Dominique Hazael-Massieux | c3911b9 | 2014-03-10 11:05:20 | [diff] [blame] | 8 | <meta name='flags' content='dom'/> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 9 | <meta name='assert' content='Check that the vibrate() method is present.'/> |
| Dominique Hazael-Massieux | 4ead9a6 | 2013-05-30 12:33:37 | [diff] [blame] | 10 | <link rel='stylesheet' href='/resources/testharness.css' media='all'/> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 11 | </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-Massieux | 4ead9a6 | 2013-05-30 12:33:37 | [diff] [blame] | 19 | <script src='/resources/testharness.js'></script> |
| Dominique Hazael-Massieux | c3911b9 | 2014-03-10 11:05:20 | [diff] [blame] | 20 | <script src='/resources/testharnessreport.js'></script> |
| 21 | <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 22 | <script> |
| 23 | test(function () { |
| Dominique Hazael-Massieux | c3911b9 | 2014-03-10 11:05:20 | [diff] [blame] | 24 | assert_true(undefined !== navigator.vibrate, "navigator.vibrate exists"); |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 25 | }, "vibrate() is present on navigator"); |
| 26 | </script> |
| 27 | </body> |
| 28 | </html> |