Bug 1283803 - part5 : fix the fail test. r=rillian
authorAlastor Wu <alwu@mozilla.com>
Tue, 19 Jul 2016 17:07:41 +0800
changeset 305763 2f178db86d26be15ab8f919f908cf54e495c9339
parent 305762 3cadccaea6c964c4ce036cd458a3418d365d3821
child 305764 8a26f6b014e67c5829f2c2a28b82f9b28fc0737d
push id79665
push usercbook@mozilla.com
push dateWed, 20 Jul 2016 09:36:22 +0000
treeherdermozilla-inbound@744232e7c04a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1283803
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1283803 - part5 : fix the fail test. r=rillian MozReview-Commit-ID: LgjDpvW2rQj
dom/media/test/mochitest.ini
dom/media/webvtt/vtt.jsm
--- a/dom/media/test/mochitest.ini
+++ b/dom/media/test/mochitest.ini
@@ -604,16 +604,17 @@ skip-if = (os == 'mac' && os_version == 
 [test_bug686942.html]
 [test_bug726904.html]
 [test_bug874897.html]
 [test_bug879717.html]
 tags=capturestream
 skip-if = os == 'win' && !debug # bug 1140675
 [test_bug883173.html]
 [test_bug895091.html]
+tags=webvtt
 [test_bug895305.html]
 [test_bug919265.html]
 [test_bug957847.html]
 [test_bug1018933.html]
 [test_bug1113600.html]
 tags=capturestream
 [test_bug1242338.html]
 [test_bug1242594.html]
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -1431,16 +1431,21 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
 
         var line;
         if (self.state === "HEADER") {
           line = parseHeader();
         }
 
         while (self.buffer) {
           if (!line) {
+            // Since the data receiving is async, we need to wait until the
+            // buffer gets the full line.
+            if (!/\r\n|\n/.test(self.buffer)) {
+              return this;
+            }
             line = collectNextLine();
           }
 
           switch (self.state) {
           case "ID":
             // Ignore NOTE and line terminator
             if (/^NOTE($|[ \t])/.test(line) || !line) {
               break;