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

Unified Diff: LayoutTests/media/track/track-cue-rendering-position-auto.html

Issue 851933003: WebVTT: Support 'auto' text position (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test nits. Created 5 years, 11 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
Index: LayoutTests/media/track/track-cue-rendering-position-auto.html
diff --git a/LayoutTests/media/track/track-cue-rendering-position-auto.html b/LayoutTests/media/track/track-cue-rendering-position-auto.html
new file mode 100644
index 0000000000000000000000000000000000000000..ddf9422ffb451054a64b991ed0544c6255f5ad6a
--- /dev/null
+++ b/LayoutTests/media/track/track-cue-rendering-position-auto.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<script src="../media-file.js"></script>
+<script>
+var mediaFile = findMediaFile('video', '../content/test');
+
+function addTrackWithCueData(video, cueData) {
+ var track = video.addTextTrack('subtitles');
+ 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;
+ color: green;
+ background-color: green;
+}
+</style>
+<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 });
+ video.src = mediaFile;
+ </script>
+</video>

Powered by Google App Engine
This is Rietveld 408576698