| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 rtc::SocketAddress remote_address("192.168.1.2", 2000 /* port number */); | 980 rtc::SocketAddress remote_address("192.168.1.2", 2000 /* port number */); |
| 981 uint16_t local_net_id = 1; | 981 uint16_t local_net_id = 1; |
| 982 uint16_t remote_net_id = 2; | 982 uint16_t remote_net_id = 2; |
| 983 int last_packet_id = 100; | 983 int last_packet_id = 100; |
| 984 rtc::scoped_ptr<cricket::CandidatePairInterface> candidate_pair( | 984 rtc::scoped_ptr<cricket::CandidatePairInterface> candidate_pair( |
| 985 transport_controller1_.CreateFakeCandidatePair( | 985 transport_controller1_.CreateFakeCandidatePair( |
| 986 local_address, local_net_id, remote_address, remote_net_id)); | 986 local_address, local_net_id, remote_address, remote_net_id)); |
| 987 transport_channel1->SignalSelectedCandidatePairChanged( | 987 transport_channel1->SignalSelectedCandidatePairChanged( |
| 988 transport_channel1, candidate_pair.get(), last_packet_id); | 988 transport_channel1, candidate_pair.get(), last_packet_id); |
| 989 EXPECT_EQ(1, media_channel1_->num_network_route_changes()); | 989 EXPECT_EQ(1, media_channel1_->num_network_route_changes()); |
| 990 cricket::NetworkRoute expected_network_route(local_net_id, remote_net_id, | 990 rtc::NetworkRoute expected_network_route(local_net_id, remote_net_id, |
| 991 last_packet_id); | 991 last_packet_id); |
| 992 EXPECT_EQ(expected_network_route, media_channel1->last_network_route()); | 992 EXPECT_EQ(expected_network_route, media_channel1->last_network_route()); |
| 993 EXPECT_EQ(last_packet_id, | 993 EXPECT_EQ(last_packet_id, |
| 994 media_channel1->last_network_route().last_sent_packet_id); | 994 media_channel1->last_network_route().last_sent_packet_id); |
| 995 } | 995 } |
| 996 | 996 |
| 997 // Test setting up a call. | 997 // Test setting up a call. |
| 998 void TestCallSetup() { | 998 void TestCallSetup() { |
| 999 CreateChannels(0, 0); | 999 CreateChannels(0, 0); |
| 1000 EXPECT_FALSE(channel1_->secure()); | 1000 EXPECT_FALSE(channel1_->secure()); |
| 1001 EXPECT_TRUE(SendInitiate()); | 1001 EXPECT_TRUE(SendInitiate()); |
| (...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2810 }; | 2810 }; |
| 2811 rtc::CopyOnWriteBuffer payload(data, 3); | 2811 rtc::CopyOnWriteBuffer payload(data, 3); |
| 2812 cricket::SendDataResult result; | 2812 cricket::SendDataResult result; |
| 2813 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 2813 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 2814 EXPECT_EQ(params.ssrc, | 2814 EXPECT_EQ(params.ssrc, |
| 2815 media_channel1_->last_sent_data_params().ssrc); | 2815 media_channel1_->last_sent_data_params().ssrc); |
| 2816 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 2816 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 2817 } | 2817 } |
| 2818 | 2818 |
| 2819 // TODO(pthatcher): TestSetReceiver? | 2819 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |