| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/proxy/proxy_service.h" | 5 #include "net/proxy/proxy_service.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "googleurl/src/gurl.h" | |
| 14 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
| 15 #include "net/base/net_log.h" | 14 #include "net/base/net_log.h" |
| 16 #include "net/base/net_log_unittest.h" | 15 #include "net/base/net_log_unittest.h" |
| 17 #include "net/base/test_completion_callback.h" | 16 #include "net/base/test_completion_callback.h" |
| 18 #include "net/proxy/dhcp_proxy_script_fetcher.h" | 17 #include "net/proxy/dhcp_proxy_script_fetcher.h" |
| 19 #include "net/proxy/mock_proxy_resolver.h" | 18 #include "net/proxy/mock_proxy_resolver.h" |
| 20 #include "net/proxy/mock_proxy_script_fetcher.h" | 19 #include "net/proxy/mock_proxy_script_fetcher.h" |
| 21 #include "net/proxy/proxy_config_service.h" | 20 #include "net/proxy/proxy_config_service.h" |
| 22 #include "net/proxy/proxy_resolver.h" | 21 #include "net/proxy/proxy_resolver.h" |
| 23 #include "net/proxy/proxy_script_fetcher.h" | 22 #include "net/proxy/proxy_script_fetcher.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 #include "url/gurl.h" |
| 25 | 25 |
| 26 // TODO(eroman): Write a test which exercises | 26 // TODO(eroman): Write a test which exercises |
| 27 // ProxyService::SuspendAllPendingRequests(). | 27 // ProxyService::SuspendAllPendingRequests(). |
| 28 namespace net { | 28 namespace net { |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 // This polling policy will decide to poll every 1 ms. | 31 // This polling policy will decide to poll every 1 ms. |
| 32 class ImmediatePollPolicy : public ProxyService::PacPollPolicy { | 32 class ImmediatePollPolicy : public ProxyService::PacPollPolicy { |
| 33 public: | 33 public: |
| 34 ImmediatePollPolicy() {} | 34 ImmediatePollPolicy() {} |
| (...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2782 ProxyInfo info3; | 2782 ProxyInfo info3; |
| 2783 TestCompletionCallback callback3; | 2783 TestCompletionCallback callback3; |
| 2784 rv = service.ResolveProxy( | 2784 rv = service.ResolveProxy( |
| 2785 GURL("http://request3"), &info3, callback3.callback(), NULL, | 2785 GURL("http://request3"), &info3, callback3.callback(), NULL, |
| 2786 BoundNetLog()); | 2786 BoundNetLog()); |
| 2787 EXPECT_EQ(OK, rv); | 2787 EXPECT_EQ(OK, rv); |
| 2788 EXPECT_TRUE(info3.is_direct()); | 2788 EXPECT_TRUE(info3.is_direct()); |
| 2789 } | 2789 } |
| 2790 | 2790 |
| 2791 } // namespace net | 2791 } // namespace net |
| OLD | NEW |