| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_AUDIO_STREAM_REGISTRY_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_AUDIO_STREAM_REGISTRY_H_ |
| 7 |
| 8 #include "content/test/mock_audio_stream_registry.h" |
| 9 |
| 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 MockAudioStreamRegistry::MockAudioStreamRegistry(int render_process_id) |
| 15 : impl_(render_process_id) { |
| 16 // AudioStreamRegistryImpl has many DCHECKs. We reuse them here by |
| 17 // forwarding all calls. |
| 18 ON_CALL(*this, RegisterOutputStream(testing::_)) |
| 19 .WillByDefault( |
| 20 testing::Invoke(&impl_, &AudioStreamRegistry::RegisterOutputStream)); |
| 21 ON_CALL(*this, DeregisterOutputStream(testing::_)) |
| 22 .WillByDefault(testing::Invoke( |
| 23 &impl_, &AudioStreamRegistry::DeregisterOutputStream)); |
| 24 ON_CALL(*this, OutputStreamStateChanged(testing::_, testing::_)) |
| 25 .WillByDefault(testing::Invoke( |
| 26 &impl_, &AudioStreamRegistry::OutputStreamStateChanged)); |
| 27 } |
| 28 |
| 29 MockAudioStreamRegistry::~MockAudioStreamRegistry() {} |
| 30 |
| 31 } // namespace content |
| 32 |
| 33 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_AUDIO_STREAM_REGISTRY_H_ |
| OLD | NEW |