Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2008 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 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2734 // Test the InsertDtmf on specified send stream as caller. | 2734 // Test the InsertDtmf on specified send stream as caller. |
| 2735 TEST_F(WebRtcVoiceEngineTestFake, InsertDtmfOnSendStreamAsCaller) { | 2735 TEST_F(WebRtcVoiceEngineTestFake, InsertDtmfOnSendStreamAsCaller) { |
| 2736 TestInsertDtmf(kSsrc1, true); | 2736 TestInsertDtmf(kSsrc1, true); |
| 2737 } | 2737 } |
| 2738 | 2738 |
| 2739 // Test the InsertDtmf on specified send stream as callee. | 2739 // Test the InsertDtmf on specified send stream as callee. |
| 2740 TEST_F(WebRtcVoiceEngineTestFake, InsertDtmfOnSendStreamAsCallee) { | 2740 TEST_F(WebRtcVoiceEngineTestFake, InsertDtmfOnSendStreamAsCallee) { |
| 2741 TestInsertDtmf(kSsrc1, false); | 2741 TestInsertDtmf(kSsrc1, false); |
| 2742 } | 2742 } |
| 2743 | 2743 |
| 2744 TEST_F(WebRtcVoiceEngineTestFake, TestSetPlayoutError) { | |
| 2745 EXPECT_TRUE(SetupSendStream()); | |
| 2746 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); | |
| 2747 SetSend(channel_, true); | |
| 2748 EXPECT_TRUE(AddRecvStream(2)); | |
| 2749 EXPECT_TRUE(AddRecvStream(3)); | |
| 2750 EXPECT_TRUE(channel_->SetPlayout(true)); | |
| 2751 voe_.set_playout_fail_channel(voe_.GetLastChannel() - 1); | |
| 2752 EXPECT_TRUE(channel_->SetPlayout(false)); | |
| 2753 EXPECT_FALSE(channel_->SetPlayout(true)); | |
| 2754 } | |
| 2755 | |
|
aleloi
2016/08/03 13:38:39
This test sets up a channel for which VoE::StartPl
| |
| 2756 TEST_F(WebRtcVoiceEngineTestFake, SetAudioOptions) { | 2744 TEST_F(WebRtcVoiceEngineTestFake, SetAudioOptions) { |
| 2757 EXPECT_TRUE(SetupSendStream()); | 2745 EXPECT_TRUE(SetupSendStream()); |
| 2758 EXPECT_CALL(adm_, | 2746 EXPECT_CALL(adm_, |
| 2759 BuiltInAECIsAvailable()).Times(9).WillRepeatedly(Return(false)); | 2747 BuiltInAECIsAvailable()).Times(9).WillRepeatedly(Return(false)); |
| 2760 EXPECT_CALL(adm_, | 2748 EXPECT_CALL(adm_, |
| 2761 BuiltInAGCIsAvailable()).Times(4).WillRepeatedly(Return(false)); | 2749 BuiltInAGCIsAvailable()).Times(4).WillRepeatedly(Return(false)); |
| 2762 EXPECT_CALL(adm_, | 2750 EXPECT_CALL(adm_, |
| 2763 BuiltInNSIsAvailable()).Times(2).WillRepeatedly(Return(false)); | 2751 BuiltInNSIsAvailable()).Times(2).WillRepeatedly(Return(false)); |
| 2764 bool ec_enabled; | 2752 bool ec_enabled; |
| 2765 webrtc::EcModes ec_mode; | 2753 webrtc::EcModes ec_mode; |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3519 cricket::WebRtcVoiceEngine engine( | 3507 cricket::WebRtcVoiceEngine engine( |
| 3520 nullptr, webrtc::CreateBuiltinAudioDecoderFactory()); | 3508 nullptr, webrtc::CreateBuiltinAudioDecoderFactory()); |
| 3521 std::unique_ptr<webrtc::Call> call( | 3509 std::unique_ptr<webrtc::Call> call( |
| 3522 webrtc::Call::Create(webrtc::Call::Config())); | 3510 webrtc::Call::Create(webrtc::Call::Config())); |
| 3523 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::MediaConfig(), | 3511 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::MediaConfig(), |
| 3524 cricket::AudioOptions(), call.get()); | 3512 cricket::AudioOptions(), call.get()); |
| 3525 cricket::AudioRecvParameters parameters; | 3513 cricket::AudioRecvParameters parameters; |
| 3526 parameters.codecs = engine.recv_codecs(); | 3514 parameters.codecs = engine.recv_codecs(); |
| 3527 EXPECT_TRUE(channel.SetRecvParameters(parameters)); | 3515 EXPECT_TRUE(channel.SetRecvParameters(parameters)); |
| 3528 } | 3516 } |
| OLD | NEW |