Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: LayoutTests/media/track/track-cue-rendering-after-controls-added.html

Issue 1018593004: Implement <video controls> dodging for text track layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: braces Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/media/track/track-cue-rendering-after-controls-added-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>WebVTT two-cue layout after the first cue has ended</title> 2 <title>Text track cue layout after controls are added</title>
3 <style>
4 ::cue {
5 font-size: 50px;
6 }
7 </style>
3 <video style="border:1px solid gray"> 8 <video style="border:1px solid gray">
4 <source src="opera/track/webvtt/rendering/reftest/media/white.webm" type="vide o/webm"> 9 <source src="opera/track/webvtt/rendering/reftest/media/white.webm" type="vide o/webm">
5 <source src="opera/track/webvtt/rendering/reftest/media/white.mp4" type="video /mp4"> 10 <source src="opera/track/webvtt/rendering/reftest/media/white.mp4" type="video /mp4">
6 </video> 11 </video>
7 <script> 12 <script>
8 // Without testRunner.displayAsyncThen there is no guarantee for when the first 13 // Without testRunner.displayAsyncThen there is no guarantee for when the first
9 // cue layout is done, so make no attempt to work without testRunner. 14 // cue layout is done, so make no attempt to work without testRunner.
10 testRunner.waitUntilDone(); 15 testRunner.waitUntilDone();
11 16
12 // Add two cues, where the first cue ends before the second. 17 // Add a cue that will overlap with the video controls.
13 var video = document.querySelector("video"); 18 var video = document.querySelector("video");
14 var track = video.addTextTrack("captions"); 19 var track = video.addTextTrack("captions");
15 track.addCue(new VTTCue(0, 1, "cue 1")); 20 track.addCue(new VTTCue(0, 1, "text"));
16 track.addCue(new VTTCue(0, 3, "cue 2"));
17 track.mode = "showing"; 21 track.mode = "showing";
18 22
19 video.onloadeddata = function() { 23 video.onloadeddata = function() {
20 testRunner.displayAsyncThen(function() { 24 testRunner.displayAsyncThen(function() {
21 // Seek past the end of the first cue. The second cue should not move. 25 // Add the controls. The cue should move to avoid overlap.
22 video.currentTime = 2; 26 video.controls = true;
23 video.onseeked = function() { testRunner.notifyDone(); }; 27 testRunner.notifyDone();
24 }); 28 });
25 }; 29 };
26 </script> 30 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/track/track-cue-rendering-after-controls-added-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698