OLD | NEW |
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/call.h" | 15 #include "webrtc/call.h" |
| 16 #include "webrtc/test/fake_voice_engine.h" |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 struct CallHelper { | 20 struct CallHelper { |
20 CallHelper() { | 21 CallHelper() : voice_engine_(new webrtc::test::FakeVoiceEngine()) { |
21 webrtc::Call::Config config; | 22 webrtc::Call::Config config; |
22 // TODO(solenberg): Fill in with VoiceEngine* etc. | 23 config.voice_engine = voice_engine_.get(); |
23 call_.reset(webrtc::Call::Create(config)); | 24 call_.reset(webrtc::Call::Create(config)); |
24 } | 25 } |
25 | 26 |
26 webrtc::Call* operator->() { return call_.get(); } | 27 webrtc::Call* operator->() { return call_.get(); } |
27 | 28 |
28 private: | 29 private: |
| 30 rtc::scoped_ptr<webrtc::test::FakeVoiceEngine> voice_engine_; |
29 rtc::scoped_ptr<webrtc::Call> call_; | 31 rtc::scoped_ptr<webrtc::Call> call_; |
30 }; | 32 }; |
31 } // namespace | 33 } // namespace |
32 | 34 |
33 namespace webrtc { | 35 namespace webrtc { |
34 | 36 |
35 TEST(CallTest, ConstructDestruct) { | 37 TEST(CallTest, ConstructDestruct) { |
36 CallHelper call; | 38 CallHelper call; |
37 } | 39 } |
38 | 40 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 streams.push_front(stream); | 97 streams.push_front(stream); |
96 } | 98 } |
97 } | 99 } |
98 for (auto s : streams) { | 100 for (auto s : streams) { |
99 call->DestroyAudioReceiveStream(s); | 101 call->DestroyAudioReceiveStream(s); |
100 } | 102 } |
101 streams.clear(); | 103 streams.clear(); |
102 } | 104 } |
103 } | 105 } |
104 } // namespace webrtc | 106 } // namespace webrtc |
OLD | NEW |