OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Tests that tracks can be turned on and off through the track selection me
nu.</title> | 2 <title>Tests that tracks can be turned on and off through the track selection me
nu.</title> |
3 <script src="../resources/testharness.js"></script> | 3 <script src="../resources/testharness.js"></script> |
4 <script src="../resources/testharnessreport.js"></script> | 4 <script src="../resources/testharnessreport.js"></script> |
5 <script src="media-file.js"></script> | 5 <script src="media-file.js"></script> |
6 <script src="media-controls.js"></script> | 6 <script src="media-controls.js"></script> |
7 <video controls></video> | 7 <video controls></video> |
8 <script> | 8 <script> |
9 async_test(function(t) { | 9 async_test(function(t) { |
10 var text = ["First", "Second", "Third"]; | 10 var text = ["First", "Second", "Third"]; |
(...skipping 25 matching lines...) Expand all Loading... |
36 clickTextTrackAtIndex(video, 0); | 36 clickTextTrackAtIndex(video, 0); |
37 checkCaptionsVisible(); | 37 checkCaptionsVisible(); |
38 }); | 38 }); |
39 | 39 |
40 function checkCaptionsVisible() { | 40 function checkCaptionsVisible() { |
41 for (var i = 0; i < text.length; i++) | 41 for (var i = 0; i < text.length; i++) |
42 assert_equals(textTrackCueElementByIndex(video, i).innerText, text[i
]); | 42 assert_equals(textTrackCueElementByIndex(video, i).innerText, text[i
]); |
43 } | 43 } |
44 | 44 |
45 function checkCaptionsHidden() { | 45 function checkCaptionsHidden() { |
46 assert_equals(textTrackCueElementByIndex(video, 0), null); | 46 assert_equals(textTrackDisplayElement(video), null); |
47 } | 47 } |
48 | 48 |
49 video.src = findMediaFile("video", "content/counting"); | 49 video.src = findMediaFile("video", "content/counting"); |
50 }); | 50 }); |
51 </script> | 51 </script> |
OLD | NEW |