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 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 7 (Please avoid writing new tests using video-test.js) --> |
6 <script src=../video-test.js></script> | 8 <script src=../video-test.js></script> |
7 <script src=../media-controls.js></script> | 9 <script src=../media-controls.js></script> |
8 <script> | 10 <script> |
9 | 11 |
10 var trackElement; | 12 var trackElement; |
11 function setKind(value) | 13 function setKind(value) |
12 { | 14 { |
13 consoleWrite("<b>++ '" + value + "'</b>"); | 15 consoleWrite("<b>++ '" + value + "'</b>"); |
14 consoleWrite("<b> set via DOM</b>"); | 16 consoleWrite("<b> set via DOM</b>"); |
15 run("trackElement.removeAttribute('kind')"); | 17 run("trackElement.removeAttribute('kind')"); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 setKind("captions"); | 60 setKind("captions"); |
59 | 61 |
60 setKind("descriptions"); | 62 setKind("descriptions"); |
61 | 63 |
62 setKind("chapters"); | 64 setKind("chapters"); |
63 | 65 |
64 setKind("metadata"); | 66 setKind("metadata"); |
65 | 67 |
66 endTest(); | 68 endTest(); |
67 } | 69 } |
68 | 70 |
69 function loaded() | 71 function loaded() |
70 { | 72 { |
71 findMediaElement(); | 73 findMediaElement(); |
72 trackElement = document.getElementById('track_1'); | 74 trackElement = document.getElementById('track_1'); |
73 | 75 |
74 waitForEventsAndCall([[video, 'canplaythrough'], [trackElement,
'load']], testKind); | 76 waitForEventsAndCall([[video, 'canplaythrough'], [trackElement,
'load']], testKind); |
75 | 77 |
76 video.src = findMediaFile('video', '../content/counting'); | 78 video.src = findMediaFile('video', '../content/counting'); |
77 } | 79 } |
78 | 80 |
79 </script> | 81 </script> |
80 </head> | 82 </head> |
81 <body onload="loaded()"> | 83 <body onload="loaded()"> |
82 <p>Tests that the 'kind' attribute is set properly and that cues are onl
y visible when 'kind' is set to 'captions' or 'subtitles'.</p> | 84 <p>Tests that the 'kind' attribute is set properly and that cues are onl
y visible when 'kind' is set to 'captions' or 'subtitles'.</p> |
83 <video> | 85 <video> |
84 <track id=track_1 src="captions-webvtt/metadata.vtt" default> | 86 <track id=track_1 src="captions-webvtt/metadata.vtt" default> |
85 </video> | 87 </video> |
86 </body> | 88 </body> |
87 </html> | 89 </html> |
OLD | NEW |