| 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 <string> | 11 #include <string> |
| 12 #include "webrtc/base/autodetectproxy.h" | 12 #include "webrtc/base/autodetectproxy.h" |
| 13 #include "webrtc/base/gunit.h" | 13 #include "webrtc/base/gunit.h" |
| 14 #include "webrtc/base/httpserver.h" | 14 #include "webrtc/base/httpserver.h" |
| 15 #include "webrtc/base/proxyserver.h" | 15 #include "webrtc/base/proxyserver.h" |
| 16 #include "webrtc/base/socketadapters.h" | 16 #include "webrtc/base/socketadapters.h" |
| 17 #include "webrtc/base/testclient.h" | 17 #include "webrtc/base/testclient.h" |
| 18 #include "webrtc/base/testechoserver.h" | 18 #include "webrtc/base/testechoserver.h" |
| 19 #include "webrtc/base/virtualsocketserver.h" | 19 #include "webrtc/base/virtualsocketserver.h" |
| 20 #include "webrtc/test/testsupport/gtest_disable.h" | |
| 21 | 20 |
| 22 using rtc::Socket; | 21 using rtc::Socket; |
| 23 using rtc::Thread; | 22 using rtc::Thread; |
| 24 using rtc::SocketAddress; | 23 using rtc::SocketAddress; |
| 25 | 24 |
| 26 static const SocketAddress kSocksProxyIntAddr("1.2.3.4", 1080); | 25 static const SocketAddress kSocksProxyIntAddr("1.2.3.4", 1080); |
| 27 static const SocketAddress kSocksProxyExtAddr("1.2.3.5", 0); | 26 static const SocketAddress kSocksProxyExtAddr("1.2.3.5", 0); |
| 28 static const SocketAddress kHttpsProxyIntAddr("1.2.3.4", 443); | 27 static const SocketAddress kHttpsProxyIntAddr("1.2.3.4", 443); |
| 29 static const SocketAddress kHttpsProxyExtAddr("1.2.3.5", 0); | 28 static const SocketAddress kHttpsProxyExtAddr("1.2.3.5", 0); |
| 30 static const SocketAddress kBogusProxyIntAddr("1.2.3.4", 999); | 29 static const SocketAddress kBogusProxyIntAddr("1.2.3.4", 999); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // Tests whether we can autodetect a HTTPS proxy. | 126 // Tests whether we can autodetect a HTTPS proxy. |
| 128 TEST_F(ProxyTest, TestAutoDetectHttps) { | 127 TEST_F(ProxyTest, TestAutoDetectHttps) { |
| 129 EXPECT_EQ(rtc::PROXY_HTTPS, DetectProxyType(kHttpsProxyIntAddr)); | 128 EXPECT_EQ(rtc::PROXY_HTTPS, DetectProxyType(kHttpsProxyIntAddr)); |
| 130 } | 129 } |
| 131 */ | 130 */ |
| 132 | 131 |
| 133 // Tests whether we fail properly for no proxy. | 132 // Tests whether we fail properly for no proxy. |
| 134 TEST_F(ProxyTest, TestAutoDetectBogus) { | 133 TEST_F(ProxyTest, TestAutoDetectBogus) { |
| 135 EXPECT_EQ(rtc::PROXY_UNKNOWN, DetectProxyType(kBogusProxyIntAddr)); | 134 EXPECT_EQ(rtc::PROXY_UNKNOWN, DetectProxyType(kBogusProxyIntAddr)); |
| 136 } | 135 } |
| OLD | NEW |