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

Side by Side Diff: webrtc/call/call_unittest.cc

Issue 1418503010: Move some send stream configuration into webrtc::AudioSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include <list> 11 #include <list>
12 12
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 #include "webrtc/audio_state.h" 15 #include "webrtc/audio_state.h"
16 #include "webrtc/call.h" 16 #include "webrtc/call.h"
17 #include "webrtc/test/mock_voice_engine.h" 17 #include "webrtc/test/mock_voice_engine.h"
18 18
19 namespace { 19 namespace {
20 20
21 struct CallHelper { 21 struct CallHelper {
22 CallHelper() { 22 CallHelper() {
23 EXPECT_CALL(voice_engine_,
24 RegisterVoiceEngineObserver(testing::_)).WillOnce(testing::Return(0));
25 EXPECT_CALL(voice_engine_,
26 DeRegisterVoiceEngineObserver()).WillOnce(testing::Return(0));
27 EXPECT_CALL(voice_engine_,
28 GetEventLog()).WillOnce(testing::Return(nullptr));
29 webrtc::AudioState::Config audio_state_config; 23 webrtc::AudioState::Config audio_state_config;
30 audio_state_config.voice_engine = &voice_engine_; 24 audio_state_config.voice_engine = &voice_engine_;
31 webrtc::Call::Config config; 25 webrtc::Call::Config config;
32 config.audio_state = webrtc::AudioState::Create(audio_state_config); 26 config.audio_state = webrtc::AudioState::Create(audio_state_config);
33 call_.reset(webrtc::Call::Create(config)); 27 call_.reset(webrtc::Call::Create(config));
34 } 28 }
35 29
36 webrtc::Call* operator->() { return call_.get(); } 30 webrtc::Call* operator->() { return call_.get(); }
37 31
38 private: 32 private:
39 webrtc::test::MockVoiceEngine voice_engine_; 33 testing::NiceMock<webrtc::test::MockVoiceEngine> voice_engine_;
40 rtc::scoped_ptr<webrtc::Call> call_; 34 rtc::scoped_ptr<webrtc::Call> call_;
41 }; 35 };
42 } // namespace 36 } // namespace
43 37
44 namespace webrtc { 38 namespace webrtc {
45 39
46 TEST(CallTest, ConstructDestruct) { 40 TEST(CallTest, ConstructDestruct) {
47 CallHelper call; 41 CallHelper call;
48 } 42 }
49 43
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 streams.push_front(stream); 100 streams.push_front(stream);
107 } 101 }
108 } 102 }
109 for (auto s : streams) { 103 for (auto s : streams) {
110 call->DestroyAudioReceiveStream(s); 104 call->DestroyAudioReceiveStream(s);
111 } 105 }
112 streams.clear(); 106 streams.clear();
113 } 107 }
114 } 108 }
115 } // namespace webrtc 109 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698