OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("Verify that VTTCue exceptions are properly messaged to deve
lopers."); | 8 description("Verify that VTTCue exceptions are properly messaged to deve
lopers."); |
9 | 9 |
10 var cue = new VTTCue(0, 0, "Test."); | 10 var cue = new VTTCue(0, 0, "Test."); |
11 | 11 |
12 function testPercentage(property) { | 12 function testPercentage(property) { |
13 shouldThrow("cue." + property + " = -1;"); | 13 shouldThrow("cue." + property + " = -1;"); |
14 shouldThrow("cue." + property + " = 101;"); | 14 shouldThrow("cue." + property + " = 101;"); |
15 } | 15 } |
16 | 16 |
17 cue.snapToLines = false; | |
18 testPercentage("line"); | |
19 | |
20 testPercentage("position"); | 17 testPercentage("position"); |
21 testPercentage("size"); | 18 testPercentage("size"); |
22 </script> | 19 </script> |
23 </body> | 20 </body> |
24 </html> | 21 </html> |
OLD | NEW |