OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../js/resources/js-test-pre.js"></script> | |
4 </head> | |
5 <body> | |
6 <script> | |
7 description('Test for the Vibration API.'); | |
8 | |
9 shouldBeTrue("navigator.vibrate(0);"); | |
10 shouldBeTrue("navigator.vibrate([]);"); | |
11 shouldBeTrue("navigator.vibrate(1);"); | |
12 shouldBeTrue("navigator.vibrate([1, 2]);"); | |
13 shouldBeTrue("navigator.vibrate([1, 2, 3]);"); | |
14 shouldBeTrue("navigator.vibrate(10000);"); | |
15 shouldBeFalse("navigator.vibrate(10001);"); | |
16 shouldBeFalse("navigator.vibrate(-1);"); | |
17 shouldBeTrue("var p = []; for (var i = 0; i < 99; i++) p[i] = 1; navigator.vibra
te(p);"); | |
18 shouldBeFalse("var p = []; for (var i = 0; i < 100; i++) p[i] = 1; navigator.vib
rate(p);"); | |
19 shouldThrow("navigator.vibrate();"); | |
20 shouldThrow("navigator.vibrate([1], [2]);"); | |
21 </script> | |
22 <script src="../js/resources/js-test-post.js"></script> | |
23 </body> | |
24 </html> | |
OLD | NEW |