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> |