• Antonio Gomes's avatar
    Prepare webrtc_audio_renderer_unittest.cc for Onion souping · 3ead5290
    Antonio Gomes authored
    This CL is a preparation step to being able to move this file to Blink,
    and then removing the whole directory.
    
    Basically:
    
    - it removes WebRtcAudioRendererTest inheritance to AudioDeviceFactory,
    since it is used solely to override AudioDeviceFactory::CreateAudioRendererSink().
    
    Instead of the explicit override, which is called by explicitly by
    AudioDeviceFactoryTestingPlatformSupport::NewAudioRendererSink(), the CL just
    creates the needed media::AudioRendererSink instance directly in
    AudioDeviceFactoryTestingPlatformSupport::NewAudioRendererSink() and return it.
    
    - the rest of the CL adapts expectation checks related to
    WebRtcAudioRendererTest::MockCreateAudioRendererSink() with using
    AudioDeviceFactoryTestingPlatformSupport::MockNewAudioRendererSink() and some
    gtest tricks (eg testing::SaveArgs<>, and testing::InvokeWithoutArgs).
    This way all original checks are kept!
    
    R=guidou@chromium.org
    
    Change-Id: If517cb2ea413359bcd80ca3e25e3d91b1e3a12ec
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888555
    Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
    Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#712294}
    3ead5290
webrtc_audio_renderer_unittest.cc 14.9 KB