| 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 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3543 ch.SetIceConfig(config); | 3543 ch.SetIceConfig(config); |
| 3544 ch.MaybeStartGathering(); | 3544 ch.MaybeStartGathering(); |
| 3545 ch.AddRemoteCandidate(CreateUdpCandidate(LOCAL_PORT_TYPE, "1.1.1.1", 1, 1)); | 3545 ch.AddRemoteCandidate(CreateUdpCandidate(LOCAL_PORT_TYPE, "1.1.1.1", 1, 1)); |
| 3546 | 3546 |
| 3547 Connection* conn = WaitForConnectionTo(&ch, "1.1.1.1", 1); | 3547 Connection* conn = WaitForConnectionTo(&ch, "1.1.1.1", 1); |
| 3548 ASSERT_TRUE(conn != nullptr); | 3548 ASSERT_TRUE(conn != nullptr); |
| 3549 | 3549 |
| 3550 // Make a fake signal to remove the ports in the p2ptransportchannel. then | 3550 // Make a fake signal to remove the ports in the p2ptransportchannel. then |
| 3551 // change the ICE role and expect it to be updated. | 3551 // change the ICE role and expect it to be updated. |
| 3552 std::vector<PortInterface*> ports(1, conn->port()); | 3552 std::vector<PortInterface*> ports(1, conn->port()); |
| 3553 ch.allocator_session()->SignalPortsRemoved(ch.allocator_session(), ports); | 3553 ch.allocator_session()->SignalPortsPruned(ch.allocator_session(), ports); |
| 3554 ch.SetIceRole(ICEROLE_CONTROLLED); | 3554 ch.SetIceRole(ICEROLE_CONTROLLED); |
| 3555 EXPECT_EQ(ICEROLE_CONTROLLED, conn->port()->GetIceRole()); | 3555 EXPECT_EQ(ICEROLE_CONTROLLED, conn->port()->GetIceRole()); |
| 3556 } | 3556 } |
| 3557 | 3557 |
| 3558 // Test that the ICE role is updated even on ports with inactive networks. | 3558 // Test that the ICE role is updated even on ports with inactive networks. |
| 3559 // These ports may still have connections that need a correct role, for the | 3559 // These ports may still have connections that need a correct role, for the |
| 3560 // pings sent by those connections until they're replaced by newer-generation | 3560 // pings sent by those connections until they're replaced by newer-generation |
| 3561 // connections. | 3561 // connections. |
| 3562 TEST_F(P2PTransportChannelPingTest, TestIceRoleUpdatedOnPortAfterIceRestart) { | 3562 TEST_F(P2PTransportChannelPingTest, TestIceRoleUpdatedOnPortAfterIceRestart) { |
| 3563 FakePortAllocator pa(rtc::Thread::Current(), nullptr); | 3563 FakePortAllocator pa(rtc::Thread::Current(), nullptr); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3808 | 3808 |
| 3809 // TCP Relay/Relay is the next. | 3809 // TCP Relay/Relay is the next. |
| 3810 VerifyNextPingableConnection(RELAY_PORT_TYPE, RELAY_PORT_TYPE, | 3810 VerifyNextPingableConnection(RELAY_PORT_TYPE, RELAY_PORT_TYPE, |
| 3811 TCP_PROTOCOL_NAME); | 3811 TCP_PROTOCOL_NAME); |
| 3812 | 3812 |
| 3813 // Finally, Local/Relay will be pinged. | 3813 // Finally, Local/Relay will be pinged. |
| 3814 VerifyNextPingableConnection(LOCAL_PORT_TYPE, RELAY_PORT_TYPE); | 3814 VerifyNextPingableConnection(LOCAL_PORT_TYPE, RELAY_PORT_TYPE); |
| 3815 } | 3815 } |
| 3816 | 3816 |
| 3817 } // namespace cricket { | 3817 } // namespace cricket { |
| OLD | NEW |