diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/cras/cras_input_unittest.cc | 6 | ||||
-rw-r--r-- | media/audio/cras/cras_unified_unittest.cc | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/media/audio/cras/cras_input_unittest.cc b/media/audio/cras/cras_input_unittest.cc index 8f17c79..03c89b0 100644 --- a/media/audio/cras/cras_input_unittest.cc +++ b/media/audio/cras/cras_input_unittest.cc @@ -11,6 +11,7 @@ #include "base/time/time.h" #include "media/audio/cras/audio_manager_cras.h" #include "media/audio/cras/cras_input.h" +#include "media/audio/fake_audio_log_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -31,6 +32,8 @@ class MockAudioInputCallback : public AudioInputStream::AudioInputCallback { class MockAudioManagerCrasInput : public AudioManagerCras { public: + MockAudioManagerCrasInput() : AudioManagerCras(&fake_audio_log_factory_) {} + // We need to override this function in order to skip checking the number // of active output streams. It is because the number of active streams // is managed inside MakeAudioInputStream, and we don't use @@ -39,6 +42,9 @@ class MockAudioManagerCrasInput : public AudioManagerCras { DCHECK(stream); delete stream; } + + private: + FakeAudioLogFactory fake_audio_log_factory_; }; class CrasInputStreamTest : public testing::Test { diff --git a/media/audio/cras/cras_unified_unittest.cc b/media/audio/cras/cras_unified_unittest.cc index 7083eca..040192a 100644 --- a/media/audio/cras/cras_unified_unittest.cc +++ b/media/audio/cras/cras_unified_unittest.cc @@ -9,6 +9,7 @@ #include "base/time/time.h" #include "media/audio/cras/audio_manager_cras.h" #include "media/audio/cras/cras_unified.h" +#include "media/audio/fake_audio_log_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -33,6 +34,8 @@ class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { class MockAudioManagerCras : public AudioManagerCras { public: + MockAudioManagerCras() : AudioManagerCras(&fake_audio_log_factory_) {} + MOCK_METHOD0(Init, void()); MOCK_METHOD0(HasAudioOutputDevices, bool()); MOCK_METHOD0(HasAudioInputDevices, bool()); @@ -53,6 +56,9 @@ class MockAudioManagerCras : public AudioManagerCras { DCHECK(stream); delete stream; } + + private: + FakeAudioLogFactory fake_audio_log_factory_; }; class CrasUnifiedStreamTest : public testing::Test { |