[webkit-changes] [WebKit/WebKit] cfee0f: REGRESSION(266293 at main): media/audioSession/audioS...
youennf
noreply at github.com
Wed Sep 6 11:18:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cfee0fec20b654c0f06d3a820725b40ebb158ee9
https://github.com/WebKit/WebKit/commit/cfee0fec20b654c0f06d3a820725b40ebb158ee9
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-09-06 (Wed, 06 Sep 2023)
Changed paths:
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/testing/Internals.cpp
M Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp
M Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.h
Log Message:
-----------
REGRESSION(266293 at main): media/audioSession/audioSessionState.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=259524
rdar://112914519
Reviewed by Jean-Yves Avenard.
The flakiness was due to the following steps:
1. With internals, we simulate beginning an interruption from WebProcess, which is sent to GPU process, which does the interuption business.
2. This triggers notification to the WebProcess that the AudioSession state changed. DOMAudioSession schedules a task to check this and fires an event if needed.
3. Very close to simulating the beginning of the interruption, the WebProcess also tries to activate its audio session. On GPUProcess side, this succeeeds, which triggers ending the interruption.
4. The WebProcess is then notified and DOMAudioSession quickly schedules a task to check this and fires an event as needed.
5. In case the WebProcess beginning and end of interruptions are very close, the first DOMAudioSession task will not see a change of the DOMAudioSession state and will quit early without firing an event.
To prevent the flakiness, we enforce RemoteAudioSession::tryToSetActiveInternal to fail when we are in a test interruption and active is true, like would happen in case of a phone call interruption.
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
* Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::tryToSetActiveInternal):
(WebKit::RemoteAudioSession::endAudioSessionInterruption):
(WebKit::RemoteAudioSession::beginInterruptionForTesting):
(WebKit::RemoteAudioSession::endInterruptionForTesting):
* Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.h:
Canonical link: https://commits.webkit.org/267683@main
More information about the webkit-changes
mailing list