Title: [176406] trunk/LayoutTests
Revision
176406
Author
[email protected]
Date
2014-11-20 11:12:32 -0800 (Thu, 20 Nov 2014)

Log Message

Update media/track/track-in-band-cues-added-once.html to make failures easier to diagnose
https://bugs.webkit.org/show_bug.cgi?id=138908

Reviewed by Alexey Proskuryakov.

* media/track/track-in-band-cues-added-once.html: Update test to remove one potential
    source of flakeyness and to do more logging in the event of a failure to make debugging
    failures simpler.
* media/track/track-in-band-cues-added-once-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (176405 => 176406)


--- trunk/LayoutTests/ChangeLog	2014-11-20 19:06:43 UTC (rev 176405)
+++ trunk/LayoutTests/ChangeLog	2014-11-20 19:12:32 UTC (rev 176406)
@@ -1,3 +1,15 @@
+2014-11-20  Eric Carlson  <[email protected]>
+
+        Update media/track/track-in-band-cues-added-once.html to make failures easier to diagnose
+        https://bugs.webkit.org/show_bug.cgi?id=138908
+
+        Reviewed by Alexey Proskuryakov.
+
+        * media/track/track-in-band-cues-added-once.html: Update test to remove one potential
+            source of flakeyness and to do more logging in the event of a failure to make debugging 
+            failures simpler.
+        * media/track/track-in-band-cues-added-once-expected.txt:
+
 2014-11-20  Daniel Bates  <[email protected]>
 
         [iOS] Temporarily skip almost all DRT tests

Modified: trunk/LayoutTests/media/track/track-in-band-cues-added-once-expected.txt (176405 => 176406)


--- trunk/LayoutTests/media/track/track-in-band-cues-added-once-expected.txt	2014-11-20 19:06:43 UTC (rev 176405)
+++ trunk/LayoutTests/media/track/track-in-band-cues-added-once-expected.txt	2014-11-20 19:12:32 UTC (rev 176406)
@@ -16,13 +16,11 @@
 
 RUN(inbandTrack1.mode = 'showing')
 RUN(video.play())
-EXPECTED (inbandTrack1.cues.length > '0') OK
 RUN(video.pause())
 RUN(video.currentTime = 0)
 RUN(video.play())
 
 EVENT(seeked)
-EXPECTED (inbandTrack1.cues.length > '0') OK
 RUN(video.pause())
 END OF TEST
 

Modified: trunk/LayoutTests/media/track/track-in-band-cues-added-once.html (176405 => 176406)


--- trunk/LayoutTests/media/track/track-in-band-cues-added-once.html	2014-11-20 19:06:43 UTC (rev 176405)
+++ trunk/LayoutTests/media/track/track-in-band-cues-added-once.html	2014-11-20 19:12:32 UTC (rev 176406)
@@ -30,9 +30,7 @@
                 if (video.currentTime < 2)
                     return;
 
-                testExpected("inbandTrack1.cues.length", 0, ">");
-
-                if (!seekedCount) {
+                if (!seekedCount && inbandTrack1.cues.length >= 5) {
                     // Collect the start times of all cues, seek back to the beginning and play
                     // the same segment of the video file.
                     run("video.pause()");
@@ -44,11 +42,28 @@
                     return;
                 }
 
+                if (inbandTrack1.cues.length < cuesStarts.length)
+                    return;
+
                 run("video.pause()");
+                var failure = false;
                 for (var i = 0; i < cuesStarts.length; ++i) {
-                    if (cuesStarts[i] != inbandTrack1.cues[i].startTime)
-                        logResult(false, "Found unexpected cue starting at " + inbandTrack1.cues[i].startTime);
+                    if (cuesStarts[i] != inbandTrack1.cues[i].startTime) {
+                        failure = true;
+                        break;
+                    }
                 }
+
+                if (failure) {
+                    consoleWrite("<br><i>** FAIL<" + "/i>");
+                    for (var i = 0; i < cuesStarts.length; ++i) {
+                        var oldStart = cuesStarts[i];
+                        var newStart = inbandTrack1.cues[i].startTime;
+                        consoleWrite("Cue " + i + " start time was: " + oldStart + ", is now: " + newStart);
+                    }
+                    consoleWrite("");
+                }
+
                 endTest();
             }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to