Bug 210349

Summary: [ Mac wk2 Debug ] media/modern-media-controls/media-controller/media-controller-auto-hide.html is flaky timing out.
Product: WebKit Reporter: Jason Lawrence <Lawrence.j>
Component: MediaAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, graouts, graouts, jer.noble, philipj, sergio, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac   
OS: macOS 10.15   
Attachments:
Description Flags
Patch eric.carlson: review+

Description Jason Lawrence 2020-04-10 11:16:33 PDT
media/modern-media-controls/media-controller/media-controller-auto-hide.html

Description:
This test is flaky failing on Mac wk2 Debug. The flaky failures are apparent throughout the visible history.

History:
https://results.webkit.org/?suite=layout-tests&test=media%2Fmodern-media-controls%2Fmedia-controller%2Fmedia-controller-auto-hide.html&flavor=wk2&style=debug&platform=mac

Diff:
--- /Volumes/Data/slave/mojave-debug-tests-wk2/build/layout-test-results/media/modern-media-controls/media-controller/media-controller-auto-hide-expected.txt
+++ /Volumes/Data/slave/mojave-debug-tests-wk2/build/layout-test-results/media/modern-media-controls/media-controller/media-controller-auto-hide-actual.txt
@@ -1,13 +1,5 @@
-Testing the controls bar fades out as expected after the auto-hide delay expires upon first play.
+#PID UNRESPONSIVE - WebKitTestRunner (pid 82861)
+FAIL: Timed out waiting for notifyDone to be called
 
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS !!shadowRoot.querySelector('.media-controls') became true
-PASS shadowRoot.querySelector('.media-controls').classList.contains('faded') became false
-PASS shadowRoot.querySelector('.media-controls').classList.contains('faded') became true
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+#EOF
+#EOF
Comment 1 Radar WebKit Bug Importer 2020-04-10 11:17:12 PDT
<rdar://problem/61594098>
Comment 2 Jason Lawrence 2020-04-10 11:23:34 PDT
I have marked this test as flaky timing out while this issue is investigated.
https://trac.webkit.org/changeset/259884/webkit
Comment 3 Antoine Quint 2020-04-16 06:21:15 PDT
Using the test list for the worker where this test times out in the most recent failure reproduces the issue, see https://build.webkit.org/builders/Apple%20Mojave%20Debug%20WK2%20%28Tests%29/builds/8860.
Comment 4 Antoine Quint 2020-04-16 08:46:44 PDT
Created attachment 396652 [details]
Patch
Comment 5 Eric Carlson 2020-04-16 08:49:34 PDT
Comment on attachment 396652 [details]
Patch

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

> LayoutTests/ChangeLog:19
> +        This test had several things wrong about it. First, it manually created a MediaController in the test page and set a custom auto-hide delay on it.
> +        However, it would test the proper behavior of the auto-hide behavior on the MediaController created by the media element, querying the state of
> +        the media controls markup within that media element's shadow root. In that world, the auto-hide delay was the default delay, and not the custom
> +        one set on the page-created MediaController.
> +
> +        The cause of the timeout was that the media clip used in this test is barely longer than the auto-hide delay, and it could happen that under slow
> +        conditions, the media would end and the auto-hide timer would never have a chance to fire since it would be canceled due to auto-hide being disabled
> +        when the media is not playing, such as when it ended.
> +
> +        We make this test saner and more realistic by not customizing the auto-hide delay, removing the page MediaController and simply setting "loop" on the
> +        media element such that it never stops playing, givin the auto-hide timer additional time to fire with no risk of it being canceled by the media ending.

A+ for the ChangeLog comments!
Comment 6 Antoine Quint 2020-04-16 08:53:08 PDT
Committed r260189: <https://trac.webkit.org/changeset/260189>