Bug 221688 - [GPUP] Two tests related to media element state are flaky when media in GPU Process is enabled
Summary: [GPUP] Two tests related to media element state are flaky when media in GPU P...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks: 221830
  Show dependency treegraph
 
Reported: 2021-02-10 10:18 PST by Peng Liu
Modified: 2021-03-03 15:54 PST (History)
7 users (show)

See Also:


Attachments
Patch (6.69 KB, patch)
2021-03-02 17:41 PST, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2021-02-10 10:18:21 PST
media/W3C/video/networkState/networkState_during_loadstart.html
media/W3C/video/readyState/readyState_during_loadedmetadata.html
Comment 1 Radar WebKit Bug Importer 2021-02-17 10:19:14 PST
<rdar://problem/74439045>
Comment 2 Peng Liu 2021-03-02 14:54:09 PST
Test media/W3C/video/readyState/readyState_during_loadedmetadata.html is passing consistently on bots now.

Test media/W3C/video/networkState/networkState_during_loadstart.html still fails. But in order to reproduce the failure locally, I have to run more than 2 iterations. Like below:

run-webkit-tests --no-build media/W3C/video/networkState/networkState_during_loadstart.html --no-retry-failures --iterations=3
Comment 3 Peng Liu 2021-03-02 15:02:27 PST
Looks like when we run MediaPlayerPrivateAVFoundationObjC in the GPU process, MediaPlayerPrivateAVFoundation::m_networkState changes from MediaPlayer::NetworkState::Loading to MediaPlayer::NetworkState::Loaded quickly, and HTMLMediaElement is notified (HTMLMediaElement::setNetworkState() is called) before the "loadstart" event handler haves the chance to execute.

HTMLMediaElement::setNetworkState() will set m_networkState to NETWORK_IDLE in the process, but the test expects expects m_networkState to be NETWORK_LOADING in the "loadstart" event handler.
Comment 4 Peng Liu 2021-03-02 15:07:14 PST
I don't think the flaky failure will impact the functionality.
Comment 5 Peng Liu 2021-03-02 17:41:58 PST
Created attachment 422028 [details]
Patch
Comment 6 EWS 2021-03-03 15:54:55 PST
Committed r273853: <https://commits.webkit.org/r273853>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422028 [details].