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

Unified Diff: LayoutTests/media/track/track-webvtt-tc031-cue-recovery.html

Issue 75273002: Handle recovery on "timestamp-looking" lines in the WebVTT parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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-webvtt-tc031-cue-recovery.html
diff --git a/LayoutTests/media/track/track-webvtt-tc031-cue-recovery.html b/LayoutTests/media/track/track-webvtt-tc031-cue-recovery.html
new file mode 100644
index 0000000000000000000000000000000000000000..eacbd5acb487ef4a1f9bfc53f5a46ac33bbacb0e
--- /dev/null
+++ b/LayoutTests/media/track/track-webvtt-tc031-cue-recovery.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <script src=../media-file.js></script>
+ <script src=../video-test.js></script>
+ <script>
+
+ numberOfTrackTests = 3;
+
+ function trackLoaded()
+ {
+ numberOfTracksLoaded++;
+ if (numberOfTracksLoaded == numberOfTrackTests) {
+ testTrack(0);
+ testTrack(1);
+ testTrack(2);
+ }
+ }
+
+ function testTrack(i)
+ {
+ findMediaElement();
+ var expected =
+ {
+ length: 2,
+ tests:
+ [
+ {
+ property: "startTime",
+ values: [ "0", "2" ],
+ },
+ {
+ property: "endTime",
+ values: [ "1", "3" ],
+ },
+ {
+ property: "text",
+ values:
+ [
+ 'Valid cue 1',
+ 'Valid cue 2',
+ ],
+ },
+ ],
+ };
+
+ testCues(i, expected);
+
+ allTestsEnded();
+ }
+ </script>
+ </head>
+ <body onload="enableAllTextTracks()">
+ <p>Tests that a cue is recovered when a line with a "-->" is encountered (missing blank line separator).</p>
+ <video>
+ <track src="captions-webvtt/tc031-cue-recovery-header.vtt" onload="trackLoaded()">
+ <track src="captions-webvtt/tc031-cue-recovery-note.vtt" onload="trackLoaded()">
+ <track src="captions-webvtt/tc031-cue-recovery-cuetext.vtt" onload="trackLoaded()">
+ </video>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698