Bug 80067

Summary: Layout Test media/track/track-cues-pause-on-exit.html is flaky on chromium debug builds
Product: WebKit Reporter: Adam Klein <adamk>
Component: Tools / TestsAssignee: Victor Carbune <vcarbune>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, feature-media-reviews, fischman, vcarbune, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fixed flaky test
none
Corrected coding style issues
none
Patch using waitForEvent none

Description Adam Klein 2012-03-01 16:29:39 PST
The following layout test is flaky on Chromium debug (all platforms):

media/track/track-cues-pause-on-exit.html

See: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=media%2Ftrack%2Ftrack-cues-pause-on-exit.html

It seems to have been failing flakily since it was added 9 days ago.
Comment 1 Victor Carbune 2012-03-02 06:31:35 PST
Created attachment 129895 [details]
Fixed flaky test

This test seems to be flaky because of the to small intervals between cues exit events, which groups them in multiple missed cues at once. The video is paused synchronously while exit events are dispatched asynchronously, which sometimes leads to an inconsistency when the value of video.paused is read
Comment 2 Eric Carlson 2012-03-07 15:07:42 PST
Comment on attachment 129895 [details]
Fixed flaky test

View in context: https://bugs.webkit.org/attachment.cgi?id=129895&action=review

> LayoutTests/media/track/track-cues-pause-on-exit.html:50
> +                if (currentCueNumber == 3) {
> +                    endTest();
> +                }

Nit: braces aren't necessary because there is only one line.
Comment 3 Victor Carbune 2012-03-07 15:41:46 PST
Created attachment 130711 [details]
Corrected coding style issues
Comment 4 WebKit Review Bot 2012-03-08 07:51:11 PST
Comment on attachment 130711 [details]
Corrected coding style issues

Clearing flags on attachment: 130711

Committed r110168: <http://trac.webkit.org/changeset/110168>
Comment 5 WebKit Review Bot 2012-03-08 07:51:16 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Ami Fischman 2012-04-03 17:51:46 PDT
Victor: did you mean to also remove this test from test_expectations.txt?  It doesn't seem to be failing anymore.
Comment 7 Eric Carlson 2012-04-04 13:59:37 PDT
It still fails for me, the 'exit' event fires twice for cue ID 0 and ID 1:

@@ -16,12 +16,12 @@
 EXPECTED (video.paused == 'false') OK
 
 EVENT(exit)
-EXPECTED (currentCue.id == '2') OK
+EXPECTED (currentCue.id == '2'), OBSERVED '0' FAIL
 EXPECTED (video.paused == 'true') OK
 RUN(video.play())
 
 EVENT(exit)
-EXPECTED (currentCue.id == '3') OK
+EXPECTED (currentCue.id == '3'), OBSERVED '1' FAIL
 EXPECTED (video.paused == 'false') OK
 END OF TEST
Comment 8 Eric Carlson 2012-04-04 14:23:45 PDT
I wonder if what I am seeing is related to bug #77862?
Comment 9 Victor Carbune 2012-04-23 08:15:54 PDT
Created attachment 138351 [details]
Patch using waitForEvent

Slightly different approach, waiting for video paused events and after for the queued cue exit events
Comment 10 Eric Carlson 2012-05-04 10:59:56 PDT
Comment on attachment 138351 [details]
Patch using waitForEvent

Oops, I missed this patch somehow - sorry for the delay in reviewing it!
Comment 11 WebKit Review Bot 2012-05-04 12:53:09 PDT
Comment on attachment 138351 [details]
Patch using waitForEvent

Clearing flags on attachment: 138351

Committed r116148: <http://trac.webkit.org/changeset/116148>
Comment 12 WebKit Review Bot 2012-05-04 12:53:13 PDT
All reviewed patches have been landed.  Closing bug.