OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
5 | 5 |
6 <script src=../media-file.js></script> | 6 <script src=../media-file.js></script> |
| 7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 8 (Please avoid writing new tests using video-test.js) --> |
7 <script src=../video-test.js></script> | 9 <script src=../video-test.js></script> |
8 <script> | 10 <script> |
9 var testTrack; | 11 var testTrack; |
10 | 12 |
11 function seeked() | 13 function seeked() |
12 { | 14 { |
13 consoleWrite("** Set the mode of the text track to hidden, then
showing again. **"); | 15 consoleWrite("** Set the mode of the text track to hidden, then
showing again. **"); |
14 testTrack.track.mode = "hidden"; | 16 testTrack.track.mode = "hidden"; |
15 testTrack.track.mode = "showing"; | 17 testTrack.track.mode = "showing"; |
16 | 18 |
17 consoleWrite("** Set the mode of the text track to disabled. **"
); | 19 consoleWrite("** Set the mode of the text track to disabled. **"
); |
18 testTrack.track.mode = "disabled"; | 20 testTrack.track.mode = "disabled"; |
19 | 21 |
20 consoleWrite(""); | 22 consoleWrite(""); |
21 consoleWrite("No crash. PASS."); | 23 consoleWrite("No crash. PASS."); |
22 consoleWrite(""); | 24 consoleWrite(""); |
23 | 25 |
24 endTest(); | 26 endTest(); |
25 } | 27 } |
26 | 28 |
27 function startTest() | 29 function startTest() |
28 { | 30 { |
29 consoleWrite("** Set the mode of the text track to showing. **")
; | 31 consoleWrite("** Set the mode of the text track to showing. **")
; |
30 testTrack.track.mode = "showing"; | 32 testTrack.track.mode = "showing"; |
31 consoleWrite("** Seek to a time with a caption. **"); | 33 consoleWrite("** Seek to a time with a caption. **"); |
32 video.currentTime = 1.5; | 34 video.currentTime = 1.5; |
33 } | 35 } |
34 | 36 |
35 function loaded() | 37 function loaded() |
36 { | 38 { |
37 findMediaElement(); | 39 findMediaElement(); |
38 testTrack = document.querySelector('track'); | 40 testTrack = document.querySelector('track'); |
39 | 41 |
40 video.src = findMediaFile('video', '../content/counting'); | 42 video.src = findMediaFile('video', '../content/counting'); |
41 waitForEvent('seeked', seeked); | 43 waitForEvent('seeked', seeked); |
42 waitForEvent('canplaythrough', startTest); | 44 waitForEvent('canplaythrough', startTest); |
43 } | 45 } |
44 | 46 |
45 </script> | 47 </script> |
46 </head> | 48 </head> |
47 <body onload="loaded()"> | 49 <body onload="loaded()"> |
48 <video controls > | 50 <video controls > |
49 <track src="captions-webvtt/captions-gaps.vtt" kind="captions" defau
lt > | 51 <track src="captions-webvtt/captions-gaps.vtt" kind="captions" defau
lt > |
50 </video> | 52 </video> |
51 <p>Tests that cues are properly removed from the active cue list when thei
r track changes mode to disabled.</p> | 53 <p>Tests that cues are properly removed from the active cue list when thei
r track changes mode to disabled.</p> |
52 </body> | 54 </body> |
53 </html> | 55 </html> |
OLD | NEW |