Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 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 #if defined(WEBRTC_POSIX) | 10 #if defined(WEBRTC_POSIX) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 "2620:0:1000:1b03:2e41:38ff:fea6:f2a4", 0); | 61 "2620:0:1000:1b03:2e41:38ff:fea6:f2a4", 0); |
| 62 | 62 |
| 63 static const char kIceUfrag1[] = "TESTICEUFRAG0001"; | 63 static const char kIceUfrag1[] = "TESTICEUFRAG0001"; |
| 64 static const char kIceUfrag2[] = "TESTICEUFRAG0002"; | 64 static const char kIceUfrag2[] = "TESTICEUFRAG0002"; |
| 65 static const char kIcePwd1[] = "TESTICEPWD00000000000001"; | 65 static const char kIcePwd1[] = "TESTICEPWD00000000000001"; |
| 66 static const char kIcePwd2[] = "TESTICEPWD00000000000002"; | 66 static const char kIcePwd2[] = "TESTICEPWD00000000000002"; |
| 67 static const char kTurnUsername[] = "test"; | 67 static const char kTurnUsername[] = "test"; |
| 68 static const char kTurnPassword[] = "test"; | 68 static const char kTurnPassword[] = "test"; |
| 69 static const char kTestOrigin[] = "http://example.com"; | 69 static const char kTestOrigin[] = "http://example.com"; |
| 70 static const unsigned int kTimeout = 1000; | 70 static const unsigned int kTimeout = 1000; |
| 71 static const unsigned int kResolverTimeout = 10000; | |
|
pthatcher1
2015/12/18 21:51:44
Can you also put a comment saying why this value w
| |
| 71 | 72 |
| 72 static const cricket::ProtocolAddress kTurnUdpProtoAddr( | 73 static const cricket::ProtocolAddress kTurnUdpProtoAddr( |
| 73 kTurnUdpIntAddr, cricket::PROTO_UDP); | 74 kTurnUdpIntAddr, cricket::PROTO_UDP); |
| 74 static const cricket::ProtocolAddress kTurnTcpProtoAddr( | 75 static const cricket::ProtocolAddress kTurnTcpProtoAddr( |
| 75 kTurnTcpIntAddr, cricket::PROTO_TCP); | 76 kTurnTcpIntAddr, cricket::PROTO_TCP); |
| 76 static const cricket::ProtocolAddress kTurnUdpIPv6ProtoAddr( | 77 static const cricket::ProtocolAddress kTurnUdpIPv6ProtoAddr( |
| 77 kTurnUdpIPv6IntAddr, cricket::PROTO_UDP); | 78 kTurnUdpIPv6IntAddr, cricket::PROTO_UDP); |
| 78 | 79 |
| 79 static const unsigned int MSG_TESTFINISH = 0; | 80 static const unsigned int MSG_TESTFINISH = 0; |
| 80 | 81 |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 976 // https://code.google.com/p/webrtc/issues/detail?id=2651 | 977 // https://code.google.com/p/webrtc/issues/detail?id=2651 |
| 977 #if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) | 978 #if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) |
| 978 TEST_F(TurnPortTest, TestResolverShutdown) { | 979 TEST_F(TurnPortTest, TestResolverShutdown) { |
| 979 turn_server_.AddInternalSocket(kTurnUdpIPv6IntAddr, cricket::PROTO_UDP); | 980 turn_server_.AddInternalSocket(kTurnUdpIPv6IntAddr, cricket::PROTO_UDP); |
| 980 int last_fd_count = GetFDCount(); | 981 int last_fd_count = GetFDCount(); |
| 981 // Need to supply unresolved address to kick off resolver. | 982 // Need to supply unresolved address to kick off resolver. |
| 982 CreateTurnPort(kLocalIPv6Addr, kTurnUsername, kTurnPassword, | 983 CreateTurnPort(kLocalIPv6Addr, kTurnUsername, kTurnPassword, |
| 983 cricket::ProtocolAddress(rtc::SocketAddress( | 984 cricket::ProtocolAddress(rtc::SocketAddress( |
| 984 "www.google.invalid", 3478), cricket::PROTO_UDP)); | 985 "www.google.invalid", 3478), cricket::PROTO_UDP)); |
| 985 turn_port_->PrepareAddress(); | 986 turn_port_->PrepareAddress(); |
| 986 ASSERT_TRUE_WAIT(turn_error_, kTimeout); | 987 ASSERT_TRUE_WAIT(turn_error_, kResolverTimeout); |
| 987 EXPECT_TRUE(turn_port_->Candidates().empty()); | 988 EXPECT_TRUE(turn_port_->Candidates().empty()); |
| 988 turn_port_.reset(); | 989 turn_port_.reset(); |
| 989 rtc::Thread::Current()->Post(this, MSG_TESTFINISH); | 990 rtc::Thread::Current()->Post(this, MSG_TESTFINISH); |
| 990 // Waiting for above message to be processed. | 991 // Waiting for above message to be processed. |
| 991 ASSERT_TRUE_WAIT(test_finish_, kTimeout); | 992 ASSERT_TRUE_WAIT(test_finish_, kTimeout); |
| 992 EXPECT_EQ(last_fd_count, GetFDCount()); | 993 EXPECT_EQ(last_fd_count, GetFDCount()); |
| 993 } | 994 } |
| 994 #endif | 995 #endif |
| OLD | NEW |