| Index: media/audio/audio_system_impl_unittest.cc
|
| diff --git a/media/audio/audio_system_impl_unittest.cc b/media/audio/audio_system_impl_unittest.cc
|
| index 26f19873b429029da9ed76986fd47464ee278d3b..113f3e4901bd337d0758543fda16b4975ce32ad0 100644
|
| --- a/media/audio/audio_system_impl_unittest.cc
|
| +++ b/media/audio/audio_system_impl_unittest.cc
|
| @@ -125,6 +125,7 @@ class AudioSystemImplTest : public testing::TestWithParam<bool> {
|
| MOCK_METHOD0(AudioParametersReceived, void(void));
|
| MOCK_METHOD1(HasInputDevicesCallback, void(bool));
|
| MOCK_METHOD0(DeviceDescriptionsReceived, void(void));
|
| + MOCK_METHOD1(AssociatedOutputDeviceIDReceived, void(const std::string&));
|
|
|
| protected:
|
| base::MessageLoop message_loop_;
|
| @@ -132,7 +133,7 @@ class AudioSystemImplTest : public testing::TestWithParam<bool> {
|
| bool use_audio_thread_;
|
| base::Thread audio_thread_;
|
| MockAudioManager::UniquePtr audio_manager_;
|
| - std::unique_ptr<media::AudioSystem> audio_system_;
|
| + AudioSystem::UniquePtr audio_system_;
|
| AudioParameters input_params_;
|
| AudioParameters output_params_;
|
| AudioParameters default_output_params_;
|
| @@ -268,6 +269,22 @@ TEST_P(AudioSystemImplTest, GetOutputDeviceDescriptions) {
|
| WaitForCallback();
|
| }
|
|
|
| +TEST_P(AudioSystemImplTest, GetAssociatedOutputDeviceID) {
|
| + const std::string associated_id("associated_id");
|
| + audio_manager_->SetAssociatedOutputDeviceIDCallback(
|
| + base::Bind([](const std::string& result,
|
| + const std::string&) -> std::string { return result; },
|
| + associated_id));
|
| +
|
| + EXPECT_CALL(*this, AssociatedOutputDeviceIDReceived(associated_id));
|
| +
|
| + audio_system_->GetAssociatedOutputDeviceID(
|
| + std::string(),
|
| + base::Bind(&AudioSystemImplTest::AssociatedOutputDeviceIDReceived,
|
| + base::Unretained(this)));
|
| + WaitForCallback();
|
| +}
|
| +
|
| INSTANTIATE_TEST_CASE_P(, AudioSystemImplTest, testing::Values(false, true));
|
|
|
| } // namespace media
|
|
|