Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Side by Side Diff: test/mock_voice_engine.h

Issue 3020493002: Remove AudioDeviceObserver and make ADM not inherit from the Module interface.
Patch Set: linux build error Created 3 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 .WillRepeatedly(testing::Invoke( 56 .WillRepeatedly(testing::Invoke(
57 [](const std::map<int, SdpAudioFormat>& codecs) { 57 [](const std::map<int, SdpAudioFormat>& codecs) {
58 EXPECT_THAT(codecs, testing::IsEmpty()); 58 EXPECT_THAT(codecs, testing::IsEmpty());
59 })); 59 }));
60 EXPECT_CALL(*proxy, GetRtpRtcp(testing::_, testing::_)) 60 EXPECT_CALL(*proxy, GetRtpRtcp(testing::_, testing::_))
61 .WillRepeatedly( 61 .WillRepeatedly(
62 testing::SetArgPointee<0>(GetMockRtpRtcp(channel_id))); 62 testing::SetArgPointee<0>(GetMockRtpRtcp(channel_id)));
63 return proxy; 63 return proxy;
64 })); 64 }));
65 65
66 ON_CALL(mock_audio_device_, TimeUntilNextProcess())
67 .WillByDefault(testing::Return(1000));
68 ON_CALL(*this, audio_device_module()) 66 ON_CALL(*this, audio_device_module())
69 .WillByDefault(testing::Return(&mock_audio_device_)); 67 .WillByDefault(testing::Return(&mock_audio_device_));
70 ON_CALL(*this, audio_transport()) 68 ON_CALL(*this, audio_transport())
71 .WillByDefault(testing::Return(&mock_audio_transport_)); 69 .WillByDefault(testing::Return(&mock_audio_transport_));
72 } 70 }
73 virtual ~MockVoiceEngine() /* override */ { 71 virtual ~MockVoiceEngine() /* override */ {
74 // Decrease ref count before base class d-tor is called; otherwise it will 72 // Decrease ref count before base class d-tor is called; otherwise it will
75 // trigger an assertion. 73 // trigger an assertion.
76 --_ref_count; 74 --_ref_count;
77 } 75 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 120
123 std::map<int, std::unique_ptr<MockRtpRtcp>> mock_rtp_rtcps_; 121 std::map<int, std::unique_ptr<MockRtpRtcp>> mock_rtp_rtcps_;
124 122
125 MockAudioDeviceModule mock_audio_device_; 123 MockAudioDeviceModule mock_audio_device_;
126 MockAudioTransport mock_audio_transport_; 124 MockAudioTransport mock_audio_transport_;
127 }; 125 };
128 } // namespace test 126 } // namespace test
129 } // namespace webrtc 127 } // namespace webrtc
130 128
131 #endif // AUDIO_MOCK_VOICE_ENGINE_H_ 129 #endif // AUDIO_MOCK_VOICE_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698