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

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

Issue 1156993013: New media playback UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: manual rebaseline. Created 5 years, 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Text track cue layout after controls are added</title> 2 <title>Text track cue layout after controls are added</title>
3 <style> 3 <style>
4 ::cue { 4 ::cue {
5 font-size: 50px; 5 font-size: 50px;
6 } 6 }
7 </style> 7 </style>
8 <video style="border:1px solid gray"> 8 <video style="border:1px solid gray">
9 <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">
10 <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">
11 </video> 11 </video>
12 <script> 12 <script>
13 // Without testRunner.layoutAndPaintAsyncThen there is no guarantee for when the first 13 // Without testRunner.layoutAndPaintAsyncThen there is no guarantee for when the first
14 // 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.
15 testRunner.waitUntilDone(); 15 testRunner.waitUntilDone();
16 16
17 // Add a cue that will overlap with the video controls. 17 // Add a cue that will overlap with the video controls.
18 var video = document.querySelector("video"); 18 var video = document.querySelector("video");
19 var track = video.addTextTrack("captions"); 19 var track = video.addTextTrack("captions");
20 track.addCue(new VTTCue(0, 1, "text")); 20 track.addCue(new VTTCue(0, 1, "text"));
21 track.mode = "showing"; 21 track.mode = "showing";
22 22
23 video.onloadeddata = function() { 23 video.onloadeddata = function() {
24 testRunner.layoutAndPaintAsyncThen(function() { 24 testRunner.layoutAndPaintAsyncThen(function() {
25 // Add the controls. The cue should move to avoid overlap. 25 // Add the controls. The cue should move to avoid overlap. Defer this
philipj_slow 2015/07/08 10:31:51 Was this test flaky before as well, or what has ch
liberato (no reviews please) 2015/07/09 12:10:53 this wasn't flaky. this change gives the schedule
26 // until the controls resize.
26 video.controls = true; 27 video.controls = true;
27 testRunner.notifyDone(); 28 // Wait for the relayout event to happen.
29 setTimeout(function()
30 {
31 testRunner.notifyDone();
32 }, 0);
28 }); 33 });
29 }; 34 };
30 </script> 35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698