OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 | 4 |
5 <script src=../media-file.js></script> | 5 <script src=../media-file.js></script> |
6 <script src=../video-test.js></script> | 6 <script src=../video-test.js></script> |
7 <script> | 7 <script> |
8 | 8 |
9 var textTrack; | 9 var textTrack; |
10 var cueCount; | 10 var cueCount; |
(...skipping 23 matching lines...) Expand all Loading... |
34 testExpected("video.textTracks[0].mode", "showing"); | 34 testExpected("video.textTracks[0].mode", "showing"); |
35 consoleWrite(""); | 35 consoleWrite(""); |
36 | 36 |
37 consoleWrite("<b>*** Set to bogus value, should return default</
b>"); | 37 consoleWrite("<b>*** Set to bogus value, should return default</
b>"); |
38 var value = "bogus"; | 38 var value = "bogus"; |
39 run("textTrack.mode = '" + value + "'"); | 39 run("textTrack.mode = '" + value + "'"); |
40 testExpected("textTrack.mode", "showing"); | 40 testExpected("textTrack.mode", "showing"); |
41 testExpected("video.textTracks[0].mode", "showing"); | 41 testExpected("video.textTracks[0].mode", "showing"); |
42 consoleWrite(""); | 42 consoleWrite(""); |
43 | 43 |
| 44 consoleWrite("<b>*** Set to numeric value (no longer supported),
should return default</b>"); |
| 45 run("textTrack.mode = 2"); |
| 46 testExpected("textTrack.mode", "showing"); |
| 47 testExpected("video.textTracks[0].mode", "showing"); |
| 48 consoleWrite(""); |
| 49 |
44 consoleWrite("<b>*** Set to known values</b>"); | 50 consoleWrite("<b>*** Set to known values</b>"); |
45 consoleWrite("<b>++ 'disabled'</b>"); | 51 consoleWrite("<b>++ 'disabled'</b>"); |
46 setMode("disabled"); | 52 setMode("disabled"); |
47 | 53 |
48 video.src = findMediaFile("video", "../content/test"); | 54 video.src = findMediaFile("video", "../content/test"); |
49 video.play(); | 55 video.play(); |
50 // Wait for end of first cue (no events should fire while track
is disabled). | 56 // Wait for end of first cue (no events should fire while track
is disabled). |
51 setTimeout(testHiddenAndShowing, 400); | 57 setTimeout(testHiddenAndShowing, 400); |
52 consoleWrite("++ 0 events expected while mode = disabled"); | 58 consoleWrite("++ 0 events expected while mode = disabled"); |
53 consoleWrite(""); | 59 consoleWrite(""); |
(...skipping 22 matching lines...) Expand all Loading... |
76 | 82 |
77 </script> | 83 </script> |
78 </head> | 84 </head> |
79 <body> | 85 <body> |
80 <p>Tests that the TextTrack mode attribute is appropriately set.</p> | 86 <p>Tests that the TextTrack mode attribute is appropriately set.</p> |
81 <video> | 87 <video> |
82 <track id=track_1 src="captions-webvtt/captions-fast.vtt" onload="st
art()" default> | 88 <track id=track_1 src="captions-webvtt/captions-fast.vtt" onload="st
art()" default> |
83 </video> | 89 </video> |
84 </body> | 90 </body> |
85 </html> | 91 </html> |
OLD | NEW |