OLD | NEW |
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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 transport_channel1->SignalSelectedCandidatePairChanged( | 955 transport_channel1->SignalSelectedCandidatePairChanged( |
956 transport_channel1, candidate_pair.get(), kLastPacketId, true); | 956 transport_channel1, candidate_pair.get(), kLastPacketId, true); |
957 }); | 957 }); |
958 WaitForThreads(); | 958 WaitForThreads(); |
959 EXPECT_EQ(1, media_channel1->num_network_route_changes()); | 959 EXPECT_EQ(1, media_channel1->num_network_route_changes()); |
960 rtc::NetworkRoute expected_network_route(true, kLocalNetId, kRemoteNetId, | 960 rtc::NetworkRoute expected_network_route(true, kLocalNetId, kRemoteNetId, |
961 kLastPacketId); | 961 kLastPacketId); |
962 EXPECT_EQ(expected_network_route, media_channel1->last_network_route()); | 962 EXPECT_EQ(expected_network_route, media_channel1->last_network_route()); |
963 EXPECT_EQ(kLastPacketId, | 963 EXPECT_EQ(kLastPacketId, |
964 media_channel1->last_network_route().last_sent_packet_id); | 964 media_channel1->last_network_route().last_sent_packet_id); |
| 965 constexpr int kTransportOverheadPerPacket = 28; // Ipv4(20) + UDP(8). |
| 966 EXPECT_EQ(kTransportOverheadPerPacket, |
| 967 media_channel1->transport_overhead_per_packet()); |
965 } | 968 } |
966 | 969 |
967 // Test setting up a call. | 970 // Test setting up a call. |
968 void TestCallSetup() { | 971 void TestCallSetup() { |
969 CreateChannels(0, 0); | 972 CreateChannels(0, 0); |
970 EXPECT_FALSE(channel1_->secure()); | 973 EXPECT_FALSE(channel1_->secure()); |
971 EXPECT_TRUE(SendInitiate()); | 974 EXPECT_TRUE(SendInitiate()); |
972 if (verify_playout_) { | 975 if (verify_playout_) { |
973 EXPECT_TRUE(media_channel1_->playout()); | 976 EXPECT_TRUE(media_channel1_->playout()); |
974 } | 977 } |
(...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3675 }; | 3678 }; |
3676 rtc::CopyOnWriteBuffer payload(data, 3); | 3679 rtc::CopyOnWriteBuffer payload(data, 3); |
3677 cricket::SendDataResult result; | 3680 cricket::SendDataResult result; |
3678 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3681 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
3679 EXPECT_EQ(params.ssrc, | 3682 EXPECT_EQ(params.ssrc, |
3680 media_channel1_->last_sent_data_params().ssrc); | 3683 media_channel1_->last_sent_data_params().ssrc); |
3681 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3684 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
3682 } | 3685 } |
3683 | 3686 |
3684 // TODO(pthatcher): TestSetReceiver? | 3687 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |