| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 1 | <!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-Massieux | 4ead9a6 | 2013-05-30 12:33:37 | [diff] [blame] | 14 | <link rel='stylesheet' href='/resources/testharness.css' media='all'/> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 15 | </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-Massieux | 4ead9a6 | 2013-05-30 12:33:37 | [diff] [blame] | 23 | <script src='/resources/testharness.js'></script> |
| Dominique Hazael-Massieux | f69fc72 | 2013-05-30 12:31:40 | [diff] [blame] | 24 | <!-- 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> |