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

Unified Diff: LayoutTests/media/track/track-css-matching-css-override-settings.html

Issue 921833003: Expose APIs for text track settings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comments from fs Created 5 years, 10 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-css-matching-css-override-settings.html
diff --git a/LayoutTests/media/track/track-css-matching-css-override-settings.html b/LayoutTests/media/track/track-css-matching-css-override-settings.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0893e89df31caa004e0162b3b1f3e097548c31c
--- /dev/null
+++ b/LayoutTests/media/track/track-css-matching-css-override-settings.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<video>
fs 2015/02/17 09:43:46 I'd still put this last rather than first.
srivats 2015/02/18 01:46:51 Done.
+ <track src="captions-webvtt/styling.vtt" kind="captions" default>
+</video>
+<script src=../media-file.js></script>
+<script src=../video-test.js></script>
+<script src=../media-controls.js></script>
+
+<style>
+ video::cue {
fs 2015/02/17 09:43:46 What I meant for this test was really to have this
srivats 2015/02/18 01:46:51 Done.
+ color: cyan;
+ background-color: green;
+ text-shadow: 2px 2px #ff0000;
+ font-size: 14px;
+ font-family: fantasy;
+ font-style: italic;
+ font-variant: small-caps;
+ }
+ video::-webkit-media-text-track-display {
+ background-color: blue;
+ }
+</style>
+
+<script>
+
+ function checkExpected() {
+ cue = textTrackDisplayElement(video, 'cue');
+ display = textTrackDisplayElement(video, 'display');
+ testExpected("getComputedStyle(cue).color", "rgb(0, 255, 255)");
+ testExpected("getComputedStyle(cue).backgroundColor", "rgb(0, 128, 0)");
+ testExpected("getComputedStyle(display).backgroundColor", "rgb(0, 0, 255)");
+ testExpected("getComputedStyle(cue).textShadow", "rgb(255, 0, 0) 2px 2px 0px");
+ testExpected("getComputedStyle(cue).fontSize", "14px");
+ testExpected("getComputedStyle(cue).fontFamily", "fantasy");
+ testExpected("getComputedStyle(cue).fontStyle", "italic");
+ testExpected("getComputedStyle(cue).fontVariant", "small-caps");
+ endTest();
+ }
+
+ window.onload = function() {
+ consoleWrite("Test that WebVTT objects are being styled correctly based on css settings.");
+ findMediaElement();
+ video.src = findMediaFile('video', '../content/test');
+ waitForEvent('canplaythrough', checkExpected);
+ }
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698