| 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 <script src=../video-test.js></script> | 7 <script src=../video-test.js></script> |
| 8 <script src=../media-controls.js></script> | 8 <script src=../media-controls.js></script> |
| 9 | 9 |
| 10 <script> | 10 <script> |
| 11 | 11 |
| 12 var cueDisplayElement; | 12 var cueDisplayElement; |
| 13 | 13 |
| 14 function testPosition() | 14 function testPosition() |
| 15 { | 15 { |
| 16 if (!window.internals) { | 16 if (!window.internals) { |
| 17 consoleWrite("<br><b>** This test only works in DRT! **<" + "/b>
"); | 17 consoleWrite("<br><b>** This test only works in DRT! **<" + "/b>
"); |
| 18 return; | 18 return; |
| 19 } | 19 } |
| 20 | 20 |
| 21 consoleWrite(""); | 21 consoleWrite(""); |
| 22 |
| 22 cueDisplayElement = textTrackDisplayElement(video, 'display', 0); | 23 cueDisplayElement = textTrackDisplayElement(video, 'display', 0); |
| 23 document.body.offsetTop; // Force layout. | 24 document.body.offsetTop; // Force layout. |
| 24 testExpected("cueDisplayElement.offsetTop > (video.videoHeight * .75
)", true); | 25 testExpected("cueDisplayElement.offsetTop > (video.videoHeight * .65
)", true); |
| 25 endTest(); | 26 endTest(); |
| 26 } | 27 } |
| 27 | 28 |
| 28 function loaded() | 29 function loaded() |
| 29 { | 30 { |
| 30 consoleWrite("The top of the text track container should be in the b
ottom 25% of the video element."); | 31 consoleWrite("The top of the text track container should be in the b
ottom 35% of the video element."); |
| 31 | 32 |
| 32 findMediaElement(); | 33 findMediaElement(); |
| 33 video.src = findMediaFile('video', '../content/test'); | 34 video.src = findMediaFile('video', '../content/test'); |
| 34 waitForEvent('canplaythrough', testPosition); | 35 waitForEvent('canplaythrough', testPosition); |
| 35 } | 36 } |
| 36 | 37 |
| 37 </script> | 38 </script> |
| 38 </head> | 39 </head> |
| 39 <body onload="loaded()"> | 40 <body onload="loaded()"> |
| 40 <video controls> | 41 <video controls> |
| 41 <track src="captions-webvtt/captions-snap-to-lines-not-set.vtt" kind
="captions" > | 42 <track src="captions-webvtt/captions-snap-to-lines-not-set.vtt" kind
="captions" > |
| 42 <track src="captions-webvtt/simple-captions.vtt" kind="captions" > | 43 <track src="captions-webvtt/simple-captions.vtt" kind="captions" > |
| 43 <track src="captions-webvtt/sorted-dispatch.vtt" kind="captions" > | 44 <track src="captions-webvtt/sorted-dispatch.vtt" kind="captions" > |
| 44 <track src="captions-webvtt/captions-fast.vtt" kind="captions" > | 45 <track src="captions-webvtt/captions-fast.vtt" kind="captions" > |
| 45 <track src="captions-webvtt/captions-html.vtt" kind="captions" > | 46 <track src="captions-webvtt/captions-html.vtt" kind="captions" > |
| 46 <track src="captions-webvtt/captions.vtt" kind="captions" default> | 47 <track src="captions-webvtt/captions.vtt" kind="captions" default> |
| 47 </video> | 48 </video> |
| 48 </body> | 49 </body> |
| 49 </html> | 50 </html> |
| OLD | NEW |