| 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_script_fetcher_impl.h" | 5 #include "net/proxy/proxy_script_fetcher_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 return true; | 226 return true; |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool OnCanSetCookie(const URLRequest& request, | 229 bool OnCanSetCookie(const URLRequest& request, |
| 230 const std::string& cookie_line, | 230 const std::string& cookie_line, |
| 231 CookieOptions* options) override { | 231 CookieOptions* options) override { |
| 232 return true; | 232 return true; |
| 233 } | 233 } |
| 234 | 234 |
| 235 bool OnCanAccessFile(const URLRequest& request, | 235 bool OnCanAccessFile(const URLRequest& request, |
| 236 const base::FilePath& path) const override { | 236 const base::FilePath& original_path, |
| 237 const base::FilePath& absolute_path) const override { |
| 237 return true; | 238 return true; |
| 238 } | 239 } |
| 239 | 240 |
| 240 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 241 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
| 241 }; | 242 }; |
| 242 | 243 |
| 243 class ProxyScriptFetcherImplTest : public PlatformTest { | 244 class ProxyScriptFetcherImplTest : public PlatformTest { |
| 244 public: | 245 public: |
| 245 ProxyScriptFetcherImplTest() { | 246 ProxyScriptFetcherImplTest() { |
| 246 test_server_.AddDefaultHandlers(base::FilePath(kDocRoot)); | 247 test_server_.AddDefaultHandlers(base::FilePath(kDocRoot)); |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 TestCompletionCallback callback; | 607 TestCompletionCallback callback; |
| 607 int result = pac_fetcher.Fetch(test_server_.GetURL("/hung"), &text, | 608 int result = pac_fetcher.Fetch(test_server_.GetURL("/hung"), &text, |
| 608 callback.callback()); | 609 callback.callback()); |
| 609 EXPECT_THAT(result, IsError(ERR_CONTEXT_SHUT_DOWN)); | 610 EXPECT_THAT(result, IsError(ERR_CONTEXT_SHUT_DOWN)); |
| 610 EXPECT_EQ(0u, context_.url_requests().size()); | 611 EXPECT_EQ(0u, context_.url_requests().size()); |
| 611 } | 612 } |
| 612 | 613 |
| 613 } // namespace | 614 } // namespace |
| 614 | 615 |
| 615 } // namespace net | 616 } // namespace net |
| OLD | NEW |