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

Unified Diff: LayoutTests/http/tests/media/track/track-webvtt-slow-loading.html

Issue 59453002: Add a flushing mechanism for the WebVTTParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Even more binary 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/http/tests/media/track/track-webvtt-slow-loading.html
diff --git a/LayoutTests/http/tests/media/track/track-webvtt-slow-loading.html b/LayoutTests/http/tests/media/track/track-webvtt-slow-loading.html
new file mode 100644
index 0000000000000000000000000000000000000000..51a65b018d7f6152b79e55be37eb7d5b67226611
--- /dev/null
+++ b/LayoutTests/http/tests/media/track/track-webvtt-slow-loading.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<title>Slow loading WebVTT file interrupted just after a cue text linebreak</title>
+<script src=/media-resources/video-test.js></script>
+<script>
+function loadAndStall()
+{
+ return "http://127.0.0.1:8000/resources/load-and-stall.php";
+}
+
+function vttTrack()
+{
+ return "?name=../../../media/track/captions-webvtt/captions-multiline-lf.vtt&mimeType=text%2Fvtt";
+}
+
+window.onload = function()
+{
+ video = document.createElement('video');
+ track = document.createElement('track');
+ video.appendChild(track);
+ track.onload = function() {
+ testExpected("track.track.cues.length", 2, "===");
+ testExpected("track.track.cues[0].text", 'Lorem\u000aipsum', "===");
+ endTest();
+ };
+ track.onerror = function() {
+ failTest();
+ };
+ track.src = loadAndStall() + vttTrack() + "&stallAt=49&stallFor=1";
+ track.track.mode = "hidden";
+}
+</script>
+<p>Slow loading WebVTT file interrupted just after a cue text linebreak.</p>
« no previous file with comments | « LayoutTests/.gitattributes ('k') | LayoutTests/http/tests/media/track/track-webvtt-slow-loading-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698