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

Unified Diff: LayoutTests/media/track/track-cue-rendering-line-doesnt-fit.html

Issue 1306833003: Sync snap-to-lines VTT cue layout steps with spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Typo Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/media/track/track-cue-rendering-line-doesnt-fit-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/track/track-cue-rendering-line-doesnt-fit.html
diff --git a/LayoutTests/media/track/track-cue-rendering-position-auto.html b/LayoutTests/media/track/track-cue-rendering-line-doesnt-fit.html
similarity index 52%
copy from LayoutTests/media/track/track-cue-rendering-position-auto.html
copy to LayoutTests/media/track/track-cue-rendering-line-doesnt-fit.html
index ddf9422ffb451054a64b991ed0544c6255f5ad6a..a91f8ce0d7e88dadacc9486b08d744ff10830470 100644
--- a/LayoutTests/media/track/track-cue-rendering-position-auto.html
+++ b/LayoutTests/media/track/track-cue-rendering-line-doesnt-fit.html
@@ -3,18 +3,16 @@
<script>
var mediaFile = findMediaFile('video', '../content/test');
-function addTrackWithCueData(video, cueData) {
- var track = video.addTextTrack('subtitles');
+function addCue(track, cueData) {
var cue = new VTTCue(0, 10, 'XXX');
for (var prop in cueData)
cue[prop] = cueData[prop];
track.addCue(cue);
- track.mode = 'showing';
}
</script>
<style>
video::cue {
- font-size: 50px;
+ font-size: 120px;
color: green;
background-color: green;
}
@@ -22,21 +20,11 @@ video::cue {
<video>
<script>
var video = document.currentScript.parentNode;
- addTrackWithCueData(video, { align: 'start', line: 0 });
- video.src = mediaFile;
- </script>
-</video>
-<video>
- <script>
- var video = document.currentScript.parentNode;
- addTrackWithCueData(video, { align: 'middle', line: 0 });
- video.src = mediaFile;
- </script>
-</video>
-<video>
- <script>
- var video = document.currentScript.parentNode;
- addTrackWithCueData(video, { align: 'end', line: 0 });
+ var track = video.addTextTrack('subtitles');
+ addCue(track, { line: 0, align: 'start', text: 'PAS' });
+ // This cue will not fit, and will not be displayed.
+ addCue(track, { line: 1, align: 'start', text: 'FAI' });
+ track.mode = 'showing';
video.src = mediaFile;
</script>
</video>
« no previous file with comments | « no previous file | LayoutTests/media/track/track-cue-rendering-line-doesnt-fit-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698