Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: LayoutTests/media/track/vtt-cue-exceptions.html

Issue 140573002: Split TextTrackCue exceptions test into TextTrackCue+VTTCue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 TextTrackCue exceptions are properly messaged t o developers."); 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 testInfinityAndNaN(property) {
13 shouldThrow("cue." + property + " = Number.NaN;");
14 shouldThrow("cue." + property + " = Number.POSITIVE_INFINITY;");
15 shouldThrow("cue." + property + " = Number.NEGATIVE_INFINITY;");
16 }
17
18 function testPercentage(property) { 12 function testPercentage(property) {
19 shouldThrow("cue." + property + " = -1;"); 13 shouldThrow("cue." + property + " = -1;");
20 shouldThrow("cue." + property + " = 101;"); 14 shouldThrow("cue." + property + " = 101;");
21 } 15 }
22 16
23 testInfinityAndNaN("startTime");
24 testInfinityAndNaN("endTime");
25
26 shouldThrow("cue.vertical = 'Invalid!';"); 17 shouldThrow("cue.vertical = 'Invalid!';");
27 18
28 cue.snapToLines = false; 19 cue.snapToLines = false;
29 testPercentage("line"); 20 testPercentage("line");
30 21
31 testPercentage("position"); 22 testPercentage("position");
32 testPercentage("size"); 23 testPercentage("size");
33 24
34 shouldThrow("cue.align = 'Invalid!';"); 25 shouldThrow("cue.align = 'Invalid!';");
35 </script> 26 </script>
36 </body> 27 </body>
37 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698