Bug 224633

Summary: [ wk2 ] media/presentationmodechanged-fired-once.html is a flakey timeout
Product: WebKit Reporter: Robert Jenner <jenner>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: peng.liu6, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Robert Jenner 2021-04-15 17:02:20 PDT
media/presentationmodechanged-fired-once.html 

is a flakey timeout on wk2 in iOS 14 Simulator, Catalina, and BigSur. 

HISTORY:
https://results.webkit.org/?suite=layout-tests&test=media%2Fpresentationmodechanged-fired-once.html

History indicates the first timeout occurred at r274822.

TIMEOUT TEXT:
-This tests that the "webkitpresentationmodechanged" event is fired only once when the browser switches back to inline from the picture-in-picture mode.
+#PID UNRESPONSIVE - WebKitTestRunner (pid 78919)
+FAIL: Timed out waiting for notifyDone to be called
 
-RUN(video.src = findMediaFile("video", "content/test"))
-EVENT(canplaythrough)
-RUN(video.play())
-RUN(video.webkitSetPresentationMode("picture-in-picture"))
-EVENT(webkitpresentationmodechanged)
-EXPECTED (internals.isChangingPresentationMode(video) == 'false') OK
-EXPECTED (video.webkitPresentationMode == 'picture-in-picture') OK
-RUN(video.webkitSetPresentationMode("inline"))
-EVENT(webkitpresentationmodechanged)
-EXPECTED (video.webkitPresentationMode == 'inline') OK
-END OF TEST
-
+#EOF
+#EOF
Comment 1 Radar WebKit Bug Importer 2021-04-16 12:24:43 PDT
<rdar://problem/76772791>
Comment 2 Robert Jenner 2021-04-16 12:39:19 PDT
The timeouts are not easy to reproduce, but I have been able to reproduce it at BigSur Debug ToT using the following:

run-webkit-tests --iterations 2000 --exit-after-n-failures 1 --exit-after-n-crashes-or-timeouts 1 --debug-rwt-logging --no-retry --force --no-build -f --debug media/presentationmodechanged-fired-once.html

The timeout does not reproduce every time the above test is run. But it's the only way I've had any success at all with reproducing the timeout. I will attempt to discover a regression point, but given the flakiness of this test, I might not be able to. But we will see.
Comment 3 Robert Jenner 2021-04-16 13:35:48 PDT
Updated test expectation to Pass Timeout here while test is reviewed:

https://trac.webkit.org/changeset/276163/webkit
Comment 4 Robert Jenner 2021-04-16 13:39:00 PDT
I have not been able to reliably reproduce the timeouts. For this reason, I cannot discover a regression point.
Comment 5 Robert Jenner 2021-04-16 13:55:35 PDT
Updated expectations for iOS here as well:
https://trac.webkit.org/changeset/276165/webkit