| 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 shouldThrow("cue.vertical = 'Invalid!';"); | |
| 18 | |
| 19 cue.snapToLines = false; | 17 cue.snapToLines = false; |
| 20 testPercentage("line"); | 18 testPercentage("line"); |
| 21 | 19 |
| 22 testPercentage("position"); | 20 testPercentage("position"); |
| 23 testPercentage("size"); | 21 testPercentage("size"); |
| 24 | |
| 25 shouldThrow("cue.align = 'Invalid!';"); | |
| 26 </script> | 22 </script> |
| 27 </body> | 23 </body> |
| 28 </html> | 24 </html> |
| OLD | NEW |