Title: [166009] trunk/LayoutTests
Revision
166009
Author
bfulg...@apple.com
Date
2014-03-20 15:33:04 -0700 (Thu, 20 Mar 2014)

Log Message

Add a flushing mechanism for the WebVTTParser
https://bugs.webkit.org/show_bug.cgi?id=130532

Reviewed by Eric Carlson.

Merged from Blink (patch by vcarb...@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/1ac2b3081492ab8661429230004013a9a3623f0f
http://crbug.com/54203003
https://chromium.googlesource.com/chromium/blink/+/24343d32bc36d20d59ef3e10040faddde65929e6
http://crbug.com/59453002
https://chromium.googlesource.com/chromium/blink/+/ef2793f1d9d207389589ecf9a136ea5c7170b4af
http://crbug.com/75233002
https://chromium.googlesource.com/chromium/blink/+/a29f2f8324abcd4826b41e7dc34373dee2ec57a9
http://crbug.com/52713005
https://chromium.googlesource.com/chromium/blink/+/7ce003c8d47b39f116f1f2a592a5dfb4a9e77228
http://crbug.com/64303004
https://chromium.googlesource.com/chromium/blink/+/18f896b3498478311e880f782813d5dfc8c0c7d1
http://crbug.com/96933004
https://chromium.googlesource.com/chromium/blink/+/8670e8ecb13254a651f5493ec83f4484d18c154e
http://crbug.com/98783005
https://chromium.googlesource.com/chromium/blink/+/4ac55780a6af3d76e0159c1d145330964ad56647
http://crbug.com/104713002

* http/tests/media/track: Added.
* http/tests/media/track/track-webvtt-slow-loading-2-expected.txt: Added.
* http/tests/media/track/track-webvtt-slow-loading-2.html: Added.
* http/tests/media/track/track-webvtt-slow-loading.html: Added.
* media/track/captions-webvtt/captions-multiline-lf.vtt: Added.
* media/track/track-webvtt-tc023-markup.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (166008 => 166009)


--- trunk/LayoutTests/ChangeLog	2014-03-20 22:24:01 UTC (rev 166008)
+++ trunk/LayoutTests/ChangeLog	2014-03-20 22:33:04 UTC (rev 166009)
@@ -1,3 +1,35 @@
+2014-03-20  Brent Fulgham  <bfulg...@apple.com>
+
+        Add a flushing mechanism for the WebVTTParser
+        https://bugs.webkit.org/show_bug.cgi?id=130532
+
+        Reviewed by Eric Carlson.
+
+        Merged from Blink (patch by vcarb...@chromium.org):
+        https://chromium.googlesource.com/chromium/blink/+/1ac2b3081492ab8661429230004013a9a3623f0f
+        http://crbug.com/54203003
+        https://chromium.googlesource.com/chromium/blink/+/24343d32bc36d20d59ef3e10040faddde65929e6
+        http://crbug.com/59453002
+        https://chromium.googlesource.com/chromium/blink/+/ef2793f1d9d207389589ecf9a136ea5c7170b4af
+        http://crbug.com/75233002
+        https://chromium.googlesource.com/chromium/blink/+/a29f2f8324abcd4826b41e7dc34373dee2ec57a9
+        http://crbug.com/52713005
+        https://chromium.googlesource.com/chromium/blink/+/7ce003c8d47b39f116f1f2a592a5dfb4a9e77228
+        http://crbug.com/64303004
+        https://chromium.googlesource.com/chromium/blink/+/18f896b3498478311e880f782813d5dfc8c0c7d1
+        http://crbug.com/96933004
+        https://chromium.googlesource.com/chromium/blink/+/8670e8ecb13254a651f5493ec83f4484d18c154e
+        http://crbug.com/98783005
+        https://chromium.googlesource.com/chromium/blink/+/4ac55780a6af3d76e0159c1d145330964ad56647
+        http://crbug.com/104713002
+
+        * http/tests/media/track: Added.
+        * http/tests/media/track/track-webvtt-slow-loading-2-expected.txt: Added.
+        * http/tests/media/track/track-webvtt-slow-loading-2.html: Added.
+        * http/tests/media/track/track-webvtt-slow-loading.html: Added.
+        * media/track/captions-webvtt/captions-multiline-lf.vtt: Added.
+        * media/track/track-webvtt-tc023-markup.html:
+
 2014-03-20  David Hyatt  <hy...@apple.com>
 
         [New Multicolumn] getClientRects returns wrong rectangle

Added: trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading-2-expected.txt (0 => 166009)


--- trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading-2-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading-2-expected.txt	2014-03-20 22:33:04 UTC (rev 166009)
@@ -0,0 +1,6 @@
+Slow loading WebVTT file interrupted in the middle of a timestamp line.
+
+EXPECTED (track.track.cues.length === '2') OK
+EXPECTED (track.track.cues[0].text === 'Lorem ipsum') OK
+END OF TEST
+

Added: trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading-2.html (0 => 166009)


--- trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading-2.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading-2.html	2014-03-20 22:33:04 UTC (rev 166009)
@@ -0,0 +1,32 @@
+<!doctype html>
+<title>Slow loading WebVTT file interrupted in the middle of a timestamp line</title>
+<script src=""
+<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 = "" + vttTrack() + "&stallAt=32&stallFor=1";
+    track.track.mode = "hidden";
+}
+</script>
+<p>Slow loading WebVTT file interrupted in the middle of a timestamp line.</p>

Added: trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading.html (0 => 166009)


--- trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/media/track/track-webvtt-slow-loading.html	2014-03-20 22:33:04 UTC (rev 166009)
@@ -0,0 +1,32 @@
+<!doctype html>
+<title>Slow loading WebVTT file interrupted just after a cue text linebreak</title>
+<script src=""
+<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 = "" + vttTrack() + "&stallAt=49&stallFor=1";
+    track.track.mode = "hidden";
+}
+</script>
+<p>Slow loading WebVTT file interrupted just after a cue text linebreak.</p>

Added: trunk/LayoutTests/media/track/captions-webvtt/captions-multiline-lf.vtt (0 => 166009)


--- trunk/LayoutTests/media/track/captions-webvtt/captions-multiline-lf.vtt	                        (rev 0)
+++ trunk/LayoutTests/media/track/captions-webvtt/captions-multiline-lf.vtt	2014-03-20 22:33:04 UTC (rev 166009)
@@ -0,0 +1,10 @@
+WEBVTT
+
+1
+00:00:00.000 --> 00:00:00.300
+Lorem
+ipsum
+
+2
+00:00:01.200 --> 00:00:01.500
+dolor and literal NUL ><

Modified: trunk/LayoutTests/media/track/track-webvtt-tc023-markup.html (166008 => 166009)


--- trunk/LayoutTests/media/track/track-webvtt-tc023-markup.html	2014-03-20 22:24:01 UTC (rev 166008)
+++ trunk/LayoutTests/media/track/track-webvtt-tc023-markup.html	2014-03-20 22:33:04 UTC (rev 166009)
@@ -97,9 +97,7 @@
                 fragment = document.createDocumentFragment();
                 fragment.appendChild(document.createTextNode("The following bear is not ruby annotated and markup is removed:\nI said "));
                 fragment.appendChild(document.createTextNode("Bear"));
-                var rt = document.createElement("rt");
-                rt.appendChild(document.createTextNode("bear with me"));
-                fragment.appendChild(rt);
+                fragment.appendChild(document.createTextNode("bear with me"));
                 fragment.appendChild(document.createTextNode(" is coming!!!!"));
 
                 testExpected(fragment.isEqualNode(video.textTracks[i].cues[3].getCueAsHTML()), true);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to