Commit 3ead5290 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Prepare webrtc_audio_renderer_unittest.cc for Onion souping

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}
parent 6db1185f
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment