media/W3C/video/networkState/networkState_during_loadstart.html media/W3C/video/readyState/readyState_during_loadedmetadata.html
<rdar://problem/74439045>
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
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.
I don't think the flaky failure will impact the functionality.
Created attachment 422028 [details] Patch
Committed r273853: <https://commits.webkit.org/r273853> All reviewed patches have been landed. Closing bug and clearing flags on attachment 422028 [details].