Bug 175143

Summary: REGRESSION (r220052):VideoControlsManager.VideoControlsManagerMultipleVideosWithAudioAndAutoplay is a flaky API test.
Product: WebKit Reporter: Matt Lewis <jlewis3>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: NEW ---    
Severity: Normal CC: achristensen, ap, jer.noble, peng.liu6, ryanhaddad, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=175329
https://bugs.webkit.org/show_bug.cgi?id=130653
https://bugs.webkit.org/show_bug.cgi?id=175909
Attachments:
Description Flags
Patch none

Description Matt Lewis 2017-08-03 11:27:54 PDT
VideoControlsManager.VideoControlsManagerMultipleVideosWithAudioAndAutoplay has been a flaky timeout on macOS Sierra. 

The test first failed with this build:
https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK1%20%28Tests%29/builds/3552
https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK1%20%28Tests%29/builds/3552/steps/run-api-tests/logs/stdio

The test became flaky after the revision:
https://trac.webkit.org/changeset/220053/webkit

However I don't think this was the cause.
Comment 1 Radar WebKit Bug Importer 2017-08-07 15:03:48 PDT
<rdar://problem/33762612>
Comment 2 Matt Lewis 2017-08-09 15:47:30 PDT
Spoke with Jer about the Timeout and determined the regression point is most likely
https://trac.webkit.org/changeset/220052/webkit and likely deals with the change in html/HTMLMediaElement.cpp
Comment 3 Ryan Haddad 2017-08-14 11:33:07 PDT
Skipped this flaky test in https://trac.webkit.org/changeset/220711/webkit
Comment 4 Jer Noble 2018-01-23 07:22:21 PST
Created attachment 332028 [details]
Patch
Comment 5 Peng Liu 2020-08-26 16:05:52 PDT
Comment on attachment 332028 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:157
> +TEST(VideoControlsManager, VideoControlsManagerMultipleVideosWithAudioAndAutoplay)

Looks like this test still fails on Mac.
Comment 6 youenn fablet 2020-08-27 01:10:48 PDT
Comment on attachment 332028 [details]
Patch

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

> Tools/ChangeLog:9
> +        Add the same "twice through the event loop" fix for this tast as was done in r221589.

s/tast/task/

> Tools/TestWebKitAPI/Tests/WebKitCocoa/large-videos-with-audio-autoplay.html:7
> +        // to happen in a certain number of timeouts.

Is there a way to make Internals API know whether controls are visible?
If so, we could inject Internals in that test instead of using setTimeout.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/large-videos-with-audio-autoplay.html:10
> +                webkit.messageHandlers.testHandler.postMessage("autoplaying");

Should it be "autoplayed" instead of "autoplaying"?
Comment 7 Alex Christensen 2021-11-01 12:01:16 PDT
Comment on attachment 332028 [details]
Patch

This has been requesting review for more than one year.  If this is still needed, please rebase and re-request review.