OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>The top of the text track container should be in the bottom 25% of the vi
deo element.</title> | 2 <title>The top of the text track container should be in the bottom 25% of the vi
deo element.</title> |
3 <script src="../media-file.js"></script> | 3 <script src="../media-file.js"></script> |
4 <script src="../media-controls.js"></script> | 4 <script src="../media-controls.js"></script> |
5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
7 <video> | 7 <video> |
8 <track src="captions-webvtt/captions-snap-to-lines-not-set.vtt" kind="captio
ns" > | 8 <track src="captions-webvtt/captions-snap-to-lines-not-set.vtt" kind="captio
ns" > |
9 <track src="captions-webvtt/simple-captions.vtt" kind="captions" > | 9 <track src="captions-webvtt/simple-captions.vtt" kind="captions" > |
10 <track src="captions-webvtt/sorted-dispatch.vtt" kind="captions" > | 10 <track src="captions-webvtt/sorted-dispatch.vtt" kind="captions" > |
11 <track src="captions-webvtt/captions-fast.vtt" kind="captions" > | 11 <track src="captions-webvtt/captions-fast.vtt" kind="captions" > |
12 <track src="captions-webvtt/captions-html.vtt" kind="captions" > | 12 <track src="captions-webvtt/captions-html.vtt" kind="captions" > |
13 <track src="captions-webvtt/captions.vtt" kind="captions" default> | 13 <track src="captions-webvtt/captions.vtt" kind="captions" default> |
14 </video> | 14 </video> |
15 <script> | 15 <script> |
16 async_test(function(t) { | 16 async_test(function(t) { |
17 var video = document.querySelector("video"); | 17 var video = document.querySelector("video"); |
18 video.src = findMediaFile("video", "../content/test"); | 18 video.src = findMediaFile("video", "../content/test"); |
19 | 19 |
20 video.oncanplaythrough = t.step_func_done(function() { | 20 video.oncanplaythrough = t.step_func_done(function() { |
21 var cueDisplayElement = textTrackDisplayElement(video, "display", 0); | 21 var cueDisplayElement = textTrackDisplayElement(video); |
22 document.body.offsetTop; // Force layout. | 22 document.body.offsetTop; // Force layout. |
23 assert_true(cueDisplayElement.offsetTop > (video.videoHeight * 0.75)); | 23 assert_true(cueDisplayElement.offsetTop > (video.videoHeight * 0.75)); |
24 }); | 24 }); |
25 }); | 25 }); |
26 </script> | 26 </script> |
OLD | NEW |