Chromium Code Reviews| 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 632 | 632 |
| 633 TestSendRecv(1); | 633 TestSendRecv(1); |
| 634 } | 634 } |
| 635 | 635 |
| 636 // We pass the candidates directly to the other side. | 636 // We pass the candidates directly to the other side. |
| 637 void OnCandidate(cricket::TransportChannelImpl* ch, | 637 void OnCandidate(cricket::TransportChannelImpl* ch, |
| 638 const cricket::Candidate& c) { | 638 const cricket::Candidate& c) { |
| 639 if (force_relay_ && c.type() != cricket::RELAY_PORT_TYPE) | 639 if (force_relay_ && c.type() != cricket::RELAY_PORT_TYPE) |
| 640 return; | 640 return; |
| 641 | 641 |
| 642 if (c.protocol() == cricket::TCP_PROTOCOL_NAME) { | |
|
juberti
2015/11/14 01:09:28
I think this would be best in the TestTcp* tests b
| |
| 643 if (c.tcptype() == cricket::TCPTYPE_ACTIVE_STR) { | |
| 644 EXPECT_EQ(c.address().port(), cricket::DISCARD_PORT); | |
| 645 } else { | |
| 646 EXPECT_NE(c.address().port(), cricket::DISCARD_PORT); | |
| 647 } | |
| 648 } | |
| 649 | |
| 642 if (GetEndpoint(ch)->save_candidates_) { | 650 if (GetEndpoint(ch)->save_candidates_) { |
| 643 GetEndpoint(ch)->saved_candidates_.push_back(new CandidateData(ch, c)); | 651 GetEndpoint(ch)->saved_candidates_.push_back(new CandidateData(ch, c)); |
| 644 } else { | 652 } else { |
| 645 main_->Post(this, MSG_CANDIDATE, new CandidateData(ch, c)); | 653 main_->Post(this, MSG_CANDIDATE, new CandidateData(ch, c)); |
| 646 } | 654 } |
| 647 } | 655 } |
| 648 | 656 |
| 649 void PauseCandidates(int endpoint) { | 657 void PauseCandidates(int endpoint) { |
| 650 GetEndpoint(endpoint)->save_candidates_ = true; | 658 GetEndpoint(endpoint)->save_candidates_ = true; |
| 651 } | 659 } |
| (...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2217 // It should stop getting ports after a new connection becomes strongly | 2225 // It should stop getting ports after a new connection becomes strongly |
| 2218 // connected. | 2226 // connected. |
| 2219 ch.SetIceCredentials(kIceUfrag[1], kIcePwd[1]); | 2227 ch.SetIceCredentials(kIceUfrag[1], kIcePwd[1]); |
| 2220 ch.MaybeStartGathering(); | 2228 ch.MaybeStartGathering(); |
| 2221 ch.AddRemoteCandidate(CreateCandidate("2.2.2.2", 2, 100)); | 2229 ch.AddRemoteCandidate(CreateCandidate("2.2.2.2", 2, 100)); |
| 2222 cricket::Connection* conn2 = WaitForConnectionTo(&ch, "2.2.2.2", 2); | 2230 cricket::Connection* conn2 = WaitForConnectionTo(&ch, "2.2.2.2", 2); |
| 2223 ASSERT_TRUE(conn2 != nullptr); | 2231 ASSERT_TRUE(conn2 != nullptr); |
| 2224 conn2->ReceivedPingResponse(); // Becomes writable and receiving | 2232 conn2->ReceivedPingResponse(); // Becomes writable and receiving |
| 2225 EXPECT_TRUE(!ch.allocator_session()->IsGettingPorts()); | 2233 EXPECT_TRUE(!ch.allocator_session()->IsGettingPorts()); |
| 2226 } | 2234 } |
| OLD | NEW |