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