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

Unified Diff: LayoutTests/media/track/track-css-matching-user-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-user-override-settings.html
diff --git a/LayoutTests/media/track/track-css-matching-user-override-settings.html b/LayoutTests/media/track/track-css-matching-user-override-settings.html
new file mode 100644
index 0000000000000000000000000000000000000000..8c2d9d908503713c57907ab071a21cddca0bbb1c
--- /dev/null
+++ b/LayoutTests/media/track/track-css-matching-user-override-settings.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<video>
fs 2015/02/17 09:43:47 See issue in other test.
srivats 2015/02/18 01:46:52 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>
+<script>
+
+ function initSettings() {
+ if (window.internals) {
+ internals.settings.setTextTrackTextColor("cyan");
+ internals.settings.setTextTrackBackgroundColor("green");
+ internals.settings.setTextTrackWindowColor("blue");
+ internals.settings.setTextTrackTextShadow("2px 2px #ff0000")
+ internals.settings.setTextTrackTextSize("14px");
+ internals.settings.setTextTrackFontFamily("fantasy");
+ internals.settings.setTextTrackFontStyle("italic");
+ internals.settings.setTextTrackFontVariant("small-caps");
+ }
+ }
+
+ 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() {
+ initSettings();
+ consoleWrite("Test that WebVTT objects are being styled correctly based on user settings.");
+ findMediaElement();
+ video.src = findMediaFile('video', '../content/test');
+ waitForEvent('canplaythrough', checkExpected);
+ }
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698