OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../fast/js/resources/js-test-pre.js"></script> | 3 <script src="../fast/js/resources/js-test-pre.js"></script> |
4 <script src="vibration-utils.js"></script> | 4 <script src="vibration-utils.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description('Tests for how durations are handled in the Vibration API.'); | 8 description('Tests for how durations are handled in the Vibration API.'); |
9 | 9 |
10 // Empty pattern is empty. Does not start a vibration. | 10 // Empty pattern is empty. Does not start a vibration. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // number, then it is truncated to the maximum duration. | 53 // number, then it is truncated to the maximum duration. |
54 // All values in the sequence overflow and truncate in the same way. | 54 // All values in the sequence overflow and truncate in the same way. |
55 // This is a bug, and this test exposes the incorrect behavior. | 55 // This is a bug, and this test exposes the incorrect behavior. |
56 // FIXME: http://crbug.com/309700 | 56 // FIXME: http://crbug.com/309700 |
57 shouldBeTrue("navigator.vibrate([-1, -1, -1])"); | 57 shouldBeTrue("navigator.vibrate([-1, -1, -1])"); |
58 shouldBeTrue("areArraysEqual(internals.pendingVibrationPattern(document), [10000
, 10000, 10000])"); | 58 shouldBeTrue("areArraysEqual(internals.pendingVibrationPattern(document), [10000
, 10000, 10000])"); |
59 shouldBeTrue("internals.isVibrating(document)"); | 59 shouldBeTrue("internals.isVibrating(document)"); |
60 stopVibration(); | 60 stopVibration(); |
61 | 61 |
62 </script> | 62 </script> |
63 <script src="../fast/js/resources/js-test-post.js"></script> | |
64 </body> | 63 </body> |
65 </html> | 64 </html> |
OLD | NEW |