| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  211 // Test that we fail properly if we can't get an address. |  211 // Test that we fail properly if we can't get an address. | 
|  212 TEST_F(StunPortTest, TestPrepareAddressFail) { |  212 TEST_F(StunPortTest, TestPrepareAddressFail) { | 
|  213   CreateStunPort(kBadAddr); |  213   CreateStunPort(kBadAddr); | 
|  214   PrepareAddress(); |  214   PrepareAddress(); | 
|  215   EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); |  215   EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); | 
|  216   EXPECT_TRUE(error()); |  216   EXPECT_TRUE(error()); | 
|  217   EXPECT_EQ(0U, port()->Candidates().size()); |  217   EXPECT_EQ(0U, port()->Candidates().size()); | 
|  218 } |  218 } | 
|  219  |  219  | 
|  220 // Test that we can get an address from a STUN server specified by a hostname. |  220 // Test that we can get an address from a STUN server specified by a hostname. | 
|  221 TEST_F(StunPortTest, TestPrepareAddressHostname) { |  221 // Crashes on Linux, see webrtc:7416 | 
 |  222 #if defined(WEBRTC_LINUX) | 
 |  223 #define MAYBE_TestPrepareAddressHostname DISABLED_TestPrepareAddressHostname | 
 |  224 #else | 
 |  225 #define MAYBE_TestPrepareAddressHostname TestPrepareAddressHostname | 
 |  226 #endif | 
 |  227 TEST_F(StunPortTest, MAYBE_TestPrepareAddressHostname) { | 
|  222   CreateStunPort(kStunHostnameAddr); |  228   CreateStunPort(kStunHostnameAddr); | 
|  223   PrepareAddress(); |  229   PrepareAddress(); | 
|  224   EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); |  230   EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); | 
|  225   ASSERT_EQ(1U, port()->Candidates().size()); |  231   ASSERT_EQ(1U, port()->Candidates().size()); | 
|  226   EXPECT_TRUE(kLocalAddr.EqualIPs(port()->Candidates()[0].address())); |  232   EXPECT_TRUE(kLocalAddr.EqualIPs(port()->Candidates()[0].address())); | 
|  227   EXPECT_EQ(kStunCandidatePriority, port()->Candidates()[0].priority()); |  233   EXPECT_EQ(kStunCandidatePriority, port()->Candidates()[0].priority()); | 
|  228 } |  234 } | 
|  229  |  235  | 
|  230 // Test that we handle hostname lookup failures properly. |  236 // Test that we handle hostname lookup failures properly. | 
|  231 TEST_F(StunPortTestWithRealClock, TestPrepareAddressHostnameFail) { |  237 TEST_F(StunPortTestWithRealClock, TestPrepareAddressHostnameFail) { | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  374 // Test that by default, the STUN binding requests will last for a long time. |  380 // Test that by default, the STUN binding requests will last for a long time. | 
|  375 TEST_F(StunPortTest, TestStunBindingRequestLongLifetime) { |  381 TEST_F(StunPortTest, TestStunBindingRequestLongLifetime) { | 
|  376   SetKeepaliveDelay(101); |  382   SetKeepaliveDelay(101); | 
|  377   CreateStunPort(kStunAddr1); |  383   CreateStunPort(kStunAddr1); | 
|  378   PrepareAddress(); |  384   PrepareAddress(); | 
|  379   EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); |  385   EXPECT_TRUE_SIMULATED_WAIT(done(), kTimeoutMs, fake_clock); | 
|  380   EXPECT_TRUE_SIMULATED_WAIT( |  386   EXPECT_TRUE_SIMULATED_WAIT( | 
|  381       port()->HasPendingRequest(cricket::STUN_BINDING_REQUEST), 1000, |  387       port()->HasPendingRequest(cricket::STUN_BINDING_REQUEST), 1000, | 
|  382       fake_clock); |  388       fake_clock); | 
|  383 } |  389 } | 
| OLD | NEW |