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 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <memory> | 12 #include <memory> |
13 | 13 |
14 #include "webrtc/p2p/base/basicpacketsocketfactory.h" | 14 #include "webrtc/p2p/base/basicpacketsocketfactory.h" |
15 #include "webrtc/p2p/base/p2pconstants.h" | 15 #include "webrtc/p2p/base/p2pconstants.h" |
16 #include "webrtc/p2p/base/p2ptransportchannel.h" | 16 #include "webrtc/p2p/base/p2ptransportchannel.h" |
17 #include "webrtc/p2p/base/testrelayserver.h" | 17 #include "webrtc/p2p/base/testrelayserver.h" |
18 #include "webrtc/p2p/base/teststunserver.h" | 18 #include "webrtc/p2p/base/teststunserver.h" |
19 #include "webrtc/p2p/base/testturnserver.h" | 19 #include "webrtc/p2p/base/testturnserver.h" |
20 #include "webrtc/p2p/client/basicportallocator.h" | 20 #include "webrtc/p2p/client/basicportallocator.h" |
21 #include "webrtc/base/fakenetwork.h" | 21 #include "webrtc/base/fakenetwork.h" |
22 #include "webrtc/base/firewallsocketserver.h" | |
23 #include "webrtc/base/gunit.h" | 22 #include "webrtc/base/gunit.h" |
24 #include "webrtc/base/helpers.h" | 23 #include "webrtc/base/helpers.h" |
25 #include "webrtc/base/ipaddress.h" | 24 #include "webrtc/base/ipaddress.h" |
26 #include "webrtc/base/logging.h" | 25 #include "webrtc/base/logging.h" |
27 #include "webrtc/base/natserver.h" | 26 #include "webrtc/base/natserver.h" |
28 #include "webrtc/base/natsocketfactory.h" | 27 #include "webrtc/base/natsocketfactory.h" |
29 #include "webrtc/base/network.h" | 28 #include "webrtc/base/network.h" |
30 #include "webrtc/base/physicalsocketserver.h" | 29 #include "webrtc/base/physicalsocketserver.h" |
31 #include "webrtc/base/socketaddress.h" | 30 #include "webrtc/base/socketaddress.h" |
32 #include "webrtc/base/ssladapter.h" | 31 #include "webrtc/base/ssladapter.h" |
33 #include "webrtc/base/thread.h" | 32 #include "webrtc/base/thread.h" |
34 #include "webrtc/base/virtualsocketserver.h" | 33 #include "webrtc/base/virtualsocketserver.h" |
| 34 #include "webrtc/test/firewallsocketserver.h" |
35 | 35 |
36 using rtc::IPAddress; | 36 using rtc::IPAddress; |
37 using rtc::SocketAddress; | 37 using rtc::SocketAddress; |
38 using rtc::Thread; | 38 using rtc::Thread; |
39 | 39 |
40 static const SocketAddress kClientAddr("11.11.11.11", 0); | 40 static const SocketAddress kClientAddr("11.11.11.11", 0); |
41 static const SocketAddress kClientAddr2("22.22.22.22", 0); | 41 static const SocketAddress kClientAddr2("22.22.22.22", 0); |
42 static const SocketAddress kLoopbackAddr("127.0.0.1", 0); | 42 static const SocketAddress kLoopbackAddr("127.0.0.1", 0); |
43 static const SocketAddress kPrivateAddr("192.168.1.11", 0); | 43 static const SocketAddress kPrivateAddr("192.168.1.11", 0); |
44 static const SocketAddress kPrivateAddr2("192.168.1.12", 0); | 44 static const SocketAddress kPrivateAddr2("192.168.1.12", 0); |
(...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 for (const Candidate& candidate : candidates) { | 1796 for (const Candidate& candidate : candidates) { |
1797 // Expect only relay candidates now that the filter is applied. | 1797 // Expect only relay candidates now that the filter is applied. |
1798 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); | 1798 EXPECT_EQ(std::string(RELAY_PORT_TYPE), candidate.type()); |
1799 // Expect that the raddr is emptied due to the CF_RELAY filter. | 1799 // Expect that the raddr is emptied due to the CF_RELAY filter. |
1800 EXPECT_EQ(candidate.related_address(), | 1800 EXPECT_EQ(candidate.related_address(), |
1801 rtc::EmptySocketAddressWithFamily(candidate.address().family())); | 1801 rtc::EmptySocketAddressWithFamily(candidate.address().family())); |
1802 } | 1802 } |
1803 } | 1803 } |
1804 | 1804 |
1805 } // namespace cricket | 1805 } // namespace cricket |
OLD | NEW |