| Index: content/test/mock_audio_stream_registry.cc
|
| diff --git a/content/test/mock_audio_stream_registry.cc b/content/test/mock_audio_stream_registry.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ba74193dc40ad16c28477d361b95ad631f519d65
|
| --- /dev/null
|
| +++ b/content/test/mock_audio_stream_registry.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_AUDIO_STREAM_REGISTRY_H_
|
| +#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_AUDIO_STREAM_REGISTRY_H_
|
| +
|
| +#include "content/test/mock_audio_stream_registry.h"
|
| +
|
| +#include "testing/gmock/include/gmock/gmock.h"
|
| +
|
| +namespace content {
|
| +
|
| +MockAudioStreamRegistry::MockAudioStreamRegistry(int render_process_id)
|
| + : impl_(render_process_id) {
|
| + // AudioStreamRegistryImpl has many DCHECKs. We reuse them here by
|
| + // forwarding all calls.
|
| + ON_CALL(*this, RegisterOutputStream(testing::_))
|
| + .WillByDefault(
|
| + testing::Invoke(&impl_, &AudioStreamRegistry::RegisterOutputStream));
|
| + ON_CALL(*this, DeregisterOutputStream(testing::_))
|
| + .WillByDefault(testing::Invoke(
|
| + &impl_, &AudioStreamRegistry::DeregisterOutputStream));
|
| + ON_CALL(*this, OutputStreamStateChanged(testing::_, testing::_))
|
| + .WillByDefault(testing::Invoke(
|
| + &impl_, &AudioStreamRegistry::OutputStreamStateChanged));
|
| +}
|
| +
|
| +MockAudioStreamRegistry::~MockAudioStreamRegistry() {}
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_AUDIO_STREAM_REGISTRY_H_
|
|
|