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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 1757683002: Make the audio channel communicate network state changes to the call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added handling for the case where the enum class value is outside of the valid range Created 4 years, 9 months 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/media/engine/webrtcvideoengine2.cc ('k') | webrtc/media/engine/webrtcvoiceengine.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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); 2649 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_));
2650 stream1 = fake_call_->GetVideoReceiveStreams()[0]; 2650 stream1 = fake_call_->GetVideoReceiveStreams()[0];
2651 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream1->GetConfig().rtp.rtcp_mode); 2651 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream1->GetConfig().rtp.rtcp_mode);
2652 2652
2653 // Create a new stream and ensure it picks up the reduced size mode. 2653 // Create a new stream and ensure it picks up the reduced size mode.
2654 FakeVideoReceiveStream* stream2 = AddRecvStream(); 2654 FakeVideoReceiveStream* stream2 = AddRecvStream();
2655 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream2->GetConfig().rtp.rtcp_mode); 2655 EXPECT_EQ(webrtc::RtcpMode::kReducedSize, stream2->GetConfig().rtp.rtcp_mode);
2656 } 2656 }
2657 2657
2658 TEST_F(WebRtcVideoChannel2Test, OnReadyToSendSignalsNetworkState) { 2658 TEST_F(WebRtcVideoChannel2Test, OnReadyToSendSignalsNetworkState) {
2659 EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); 2659 EXPECT_EQ(webrtc::kNetworkUp,
2660 fake_call_->GetNetworkState(webrtc::MediaType::VIDEO));
2661 EXPECT_EQ(webrtc::kNetworkUp,
2662 fake_call_->GetNetworkState(webrtc::MediaType::AUDIO));
2660 2663
2661 channel_->OnReadyToSend(false); 2664 channel_->OnReadyToSend(false);
2662 EXPECT_EQ(webrtc::kNetworkDown, fake_call_->GetNetworkState()); 2665 EXPECT_EQ(webrtc::kNetworkDown,
2666 fake_call_->GetNetworkState(webrtc::MediaType::VIDEO));
2667 EXPECT_EQ(webrtc::kNetworkUp,
2668 fake_call_->GetNetworkState(webrtc::MediaType::AUDIO));
2663 2669
2664 channel_->OnReadyToSend(true); 2670 channel_->OnReadyToSend(true);
2665 EXPECT_EQ(webrtc::kNetworkUp, fake_call_->GetNetworkState()); 2671 EXPECT_EQ(webrtc::kNetworkUp,
2672 fake_call_->GetNetworkState(webrtc::MediaType::VIDEO));
2673 EXPECT_EQ(webrtc::kNetworkUp,
2674 fake_call_->GetNetworkState(webrtc::MediaType::AUDIO));
2666 } 2675 }
2667 2676
2668 TEST_F(WebRtcVideoChannel2Test, GetStatsReportsSentCodecName) { 2677 TEST_F(WebRtcVideoChannel2Test, GetStatsReportsSentCodecName) {
2669 cricket::VideoSendParameters parameters; 2678 cricket::VideoSendParameters parameters;
2670 parameters.codecs.push_back(kVp8Codec); 2679 parameters.codecs.push_back(kVp8Codec);
2671 EXPECT_TRUE(channel_->SetSendParameters(parameters)); 2680 EXPECT_TRUE(channel_->SetSendParameters(parameters));
2672 2681
2673 AddSendStream(); 2682 AddSendStream();
2674 2683
2675 cricket::VideoMediaInfo info; 2684 cricket::VideoMediaInfo info;
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 } 3471 }
3463 3472
3464 // Test that we normalize send codec format size in simulcast. 3473 // Test that we normalize send codec format size in simulcast.
3465 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3474 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3466 cricket::VideoCodec codec(kVp8Codec270p); 3475 cricket::VideoCodec codec(kVp8Codec270p);
3467 codec.width += 1; 3476 codec.width += 1;
3468 codec.height += 1; 3477 codec.height += 1;
3469 VerifySimulcastSettings(codec, 2, 2); 3478 VerifySimulcastSettings(codec, 2, 2);
3470 } 3479 }
3471 } // namespace cricket 3480 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/media/engine/webrtcvoiceengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698