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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-css-stroke-cues.html

Issue 2753013004: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text
Patch Set: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text Created 3 years, 9 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: third_party/WebKit/LayoutTests/media/track/track-css-stroke-cues.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-css-stroke-cues.html b/third_party/WebKit/LayoutTests/media/track/track-css-stroke-cues.html
new file mode 100644
index 0000000000000000000000000000000000000000..923a9f6babcdf4f38cce919375003005aa207017
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/track/track-css-stroke-cues.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>Test that style to stroke cues is applied correctly.</title>
+<script src="../media-file.js"></script>
+<script src="../media-controls.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<video></video>
+<style>
+video::cue {
+ paint-order: stroke;
+ stroke-linecap: round;
+ stroke-linejoin: round;
+}
+</style>
+<script>
+async_test(function(t) {
+ var video = document.querySelector('video');
+ video.src = findMediaFile('video', '../content/test');
+
+ var track = document.createElement('track');
+ track.src = 'captions-webvtt/styling.vtt';
+ track.kind = 'captions';
+ track.default = true;
+ video.appendChild(track);
+
+ video.onseeked = t.step_func_done(function() {
+ var cueStyle = getComputedStyle(textTrackCueElementByIndex(video, 0).firstChild);
+ assert_equals(cueStyle.paintOrder, "stroke fill markers");
+ assert_equals(cueStyle.strokeLinejoin, "round");
+ assert_equals(cueStyle.strokeLinecap, "round");
+ });
+
+ video.currentTime = 0.5;
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698