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

Side by Side Diff: webrtc/pc/channel_unittest.cc

Issue 2041593002: Revert "Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Mark a route as disconnect if it is not ready to send media Created 4 years, 6 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
« webrtc/p2p/base/port.h ('K') | « webrtc/pc/channel.cc ('k') | no next file » | 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 2009 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2009 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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 rtc::SocketAddress local_address("192.168.1.1", 1000 /* port number */); 927 rtc::SocketAddress local_address("192.168.1.1", 1000 /* port number */);
928 rtc::SocketAddress remote_address("192.168.1.2", 2000 /* port number */); 928 rtc::SocketAddress remote_address("192.168.1.2", 2000 /* port number */);
929 std::unique_ptr<cricket::CandidatePairInterface> candidate_pair( 929 std::unique_ptr<cricket::CandidatePairInterface> candidate_pair(
930 transport_controller1_->CreateFakeCandidatePair( 930 transport_controller1_->CreateFakeCandidatePair(
931 local_address, kLocalNetId, remote_address, kRemoteNetId)); 931 local_address, kLocalNetId, remote_address, kRemoteNetId));
932 transport_channel1->SignalSelectedCandidatePairChanged( 932 transport_channel1->SignalSelectedCandidatePairChanged(
933 transport_channel1, candidate_pair.get(), kLastPacketId); 933 transport_channel1, candidate_pair.get(), kLastPacketId);
934 }); 934 });
935 WaitForThreads(); 935 WaitForThreads();
936 EXPECT_EQ(1, media_channel1->num_network_route_changes()); 936 EXPECT_EQ(1, media_channel1->num_network_route_changes());
937 rtc::NetworkRoute expected_network_route(kLocalNetId, kRemoteNetId, 937 rtc::NetworkRoute expected_network_route(true, kLocalNetId, kRemoteNetId,
938 kLastPacketId); 938 kLastPacketId);
939 EXPECT_EQ(expected_network_route, media_channel1->last_network_route()); 939 EXPECT_EQ(expected_network_route, media_channel1->last_network_route());
940 EXPECT_EQ(kLastPacketId, 940 EXPECT_EQ(kLastPacketId,
941 media_channel1->last_network_route().last_sent_packet_id); 941 media_channel1->last_network_route().last_sent_packet_id);
942 } 942 }
943 943
944 // Test setting up a call. 944 // Test setting up a call.
945 void TestCallSetup() { 945 void TestCallSetup() {
946 CreateChannels(0, 0); 946 CreateChannels(0, 0);
947 EXPECT_FALSE(channel1_->secure()); 947 EXPECT_FALSE(channel1_->secure());
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
3586 }; 3586 };
3587 rtc::CopyOnWriteBuffer payload(data, 3); 3587 rtc::CopyOnWriteBuffer payload(data, 3);
3588 cricket::SendDataResult result; 3588 cricket::SendDataResult result;
3589 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); 3589 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result));
3590 EXPECT_EQ(params.ssrc, 3590 EXPECT_EQ(params.ssrc,
3591 media_channel1_->last_sent_data_params().ssrc); 3591 media_channel1_->last_sent_data_params().ssrc);
3592 EXPECT_EQ("foo", media_channel1_->last_sent_data()); 3592 EXPECT_EQ("foo", media_channel1_->last_sent_data());
3593 } 3593 }
3594 3594
3595 // TODO(pthatcher): TestSetReceiver? 3595 // TODO(pthatcher): TestSetReceiver?
OLDNEW
« webrtc/p2p/base/port.h ('K') | « webrtc/pc/channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698