| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 static const char kIceUfrag0[] = "UF00"; | 76 static const char kIceUfrag0[] = "UF00"; |
| 77 // Based on ICE_PWD_LENGTH | 77 // Based on ICE_PWD_LENGTH |
| 78 static const char kIcePwd0[] = "TESTICEPWD00000000000000"; | 78 static const char kIcePwd0[] = "TESTICEPWD00000000000000"; |
| 79 | 79 |
| 80 static const char kContentName[] = "test content"; | 80 static const char kContentName[] = "test content"; |
| 81 | 81 |
| 82 static const int kDefaultAllocationTimeout = 3000; | 82 static const int kDefaultAllocationTimeout = 3000; |
| 83 static const char kTurnUsername[] = "test"; | 83 static const char kTurnUsername[] = "test"; |
| 84 static const char kTurnPassword[] = "test"; | 84 static const char kTurnPassword[] = "test"; |
| 85 | 85 |
| 86 // STUN timeout (with all retries) is 9500ms. | 86 // STUN timeout (with all retries) is cricket::STUN_TOTAL_TIMEOUT. |
| 87 // Add some margin of error for slow bots. | 87 // Add some margin of error for slow bots. |
| 88 // TODO(deadbeef): Use simulated clock instead of just increasing timeouts to | 88 // TODO(deadbeef): Use simulated clock instead of just increasing timeouts to |
| 89 // fix flaky tests. | 89 // fix flaky tests. |
| 90 static const int kStunTimeoutMs = 15000; | 90 static const int kStunTimeoutMs = cricket::STUN_TOTAL_TIMEOUT + 5000; |
| 91 | 91 |
| 92 namespace cricket { | 92 namespace cricket { |
| 93 | 93 |
| 94 // Helper for dumping candidates | 94 // Helper for dumping candidates |
| 95 std::ostream& operator<<(std::ostream& os, | 95 std::ostream& operator<<(std::ostream& os, |
| 96 const std::vector<Candidate>& candidates) { | 96 const std::vector<Candidate>& candidates) { |
| 97 os << '['; | 97 os << '['; |
| 98 bool first = true; | 98 bool first = true; |
| 99 for (const Candidate& c : candidates) { | 99 for (const Candidate& c : candidates) { |
| 100 if (!first) { | 100 if (!first) { |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 for (const Candidate& candidate : candidates) { | 1825 for (const Candidate& candidate : candidates) { |
| 1826 // Expect only relay candidates now that the filter is applied. | 1826 // Expect only relay candidates now that the filter is applied. |
| 1827 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); | 1827 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); |
| 1828 // Expect that the raddr is emptied due to the CF_RELAY filter. | 1828 // Expect that the raddr is emptied due to the CF_RELAY filter. |
| 1829 EXPECT_EQ(candidate.related_address(), | 1829 EXPECT_EQ(candidate.related_address(), |
| 1830 rtc::EmptySocketAddressWithFamily(candidate.address().family())); | 1830 rtc::EmptySocketAddressWithFamily(candidate.address().family())); |
| 1831 } | 1831 } |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 } // namespace cricket | 1834 } // namespace cricket |
| OLD | NEW |