| 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 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2851 | 2851 |
| 2852 // Test that we properly clean up any streams that were added, even if | 2852 // Test that we properly clean up any streams that were added, even if |
| 2853 // not explicitly removed. | 2853 // not explicitly removed. |
| 2854 TEST_F(WebRtcVoiceEngineTestFake, StreamCleanup) { | 2854 TEST_F(WebRtcVoiceEngineTestFake, StreamCleanup) { |
| 2855 EXPECT_TRUE(SetupSendStream()); | 2855 EXPECT_TRUE(SetupSendStream()); |
| 2856 SetSendParameters(send_parameters_); | 2856 SetSendParameters(send_parameters_); |
| 2857 EXPECT_TRUE(AddRecvStream(1)); | 2857 EXPECT_TRUE(AddRecvStream(1)); |
| 2858 EXPECT_TRUE(AddRecvStream(2)); | 2858 EXPECT_TRUE(AddRecvStream(2)); |
| 2859 EXPECT_EQ(3, voe_.GetNumChannels()); // default channel + 2 added | 2859 EXPECT_EQ(3, voe_.GetNumChannels()); // default channel + 2 added |
| 2860 delete channel_; | 2860 delete channel_; |
| 2861 channel_ = NULL; | 2861 channel_ = nullptr; |
| 2862 EXPECT_EQ(0, voe_.GetNumChannels()); | 2862 EXPECT_EQ(0, voe_.GetNumChannels()); |
| 2863 } | 2863 } |
| 2864 | 2864 |
| 2865 TEST_F(WebRtcVoiceEngineTestFake, TestAddRecvStreamFailWithZeroSsrc) { | 2865 TEST_F(WebRtcVoiceEngineTestFake, TestAddRecvStreamFailWithZeroSsrc) { |
| 2866 EXPECT_TRUE(SetupSendStream()); | 2866 EXPECT_TRUE(SetupSendStream()); |
| 2867 EXPECT_FALSE(AddRecvStream(0)); | 2867 EXPECT_FALSE(AddRecvStream(0)); |
| 2868 } | 2868 } |
| 2869 | 2869 |
| 2870 TEST_F(WebRtcVoiceEngineTestFake, TestNoLeakingWhenAddRecvStreamFail) { | 2870 TEST_F(WebRtcVoiceEngineTestFake, TestNoLeakingWhenAddRecvStreamFail) { |
| 2871 EXPECT_TRUE(SetupChannel()); | 2871 EXPECT_TRUE(SetupChannel()); |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3743 // Without this cast, the comparison turned unsigned and, thus, failed for -1. | 3743 // Without this cast, the comparison turned unsigned and, thus, failed for -1. |
| 3744 const int num_specs = static_cast<int>(specs.size()); | 3744 const int num_specs = static_cast<int>(specs.size()); |
| 3745 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs); | 3745 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs); |
| 3746 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs); | 3746 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs); |
| 3747 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1); | 3747 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1); |
| 3748 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs); | 3748 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs); |
| 3749 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs); | 3749 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs); |
| 3750 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs); | 3750 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs); |
| 3751 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs); | 3751 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs); |
| 3752 } | 3752 } |
| OLD | NEW |