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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 return true; | 196 return true; |
197 } | 197 } |
198 | 198 |
199 bool OnCanSetCookie(const URLRequest& request, | 199 bool OnCanSetCookie(const URLRequest& request, |
200 const std::string& cookie_line, | 200 const std::string& cookie_line, |
201 CookieOptions* options) override { | 201 CookieOptions* options) override { |
202 return true; | 202 return true; |
203 } | 203 } |
204 | 204 |
205 bool OnCanAccessFile(const URLRequest& request, | 205 bool OnCanAccessFile(const URLRequest& request, |
206 const base::FilePath& path) const override { | 206 const base::FilePath& original_path, |
| 207 const base::FilePath& absolute_path) const override { |
207 return true; | 208 return true; |
208 } | 209 } |
209 | 210 |
210 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 211 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
211 }; | 212 }; |
212 | 213 |
213 class ProxyScriptFetcherImplTest : public PlatformTest { | 214 class ProxyScriptFetcherImplTest : public PlatformTest { |
214 public: | 215 public: |
215 ProxyScriptFetcherImplTest() { | 216 ProxyScriptFetcherImplTest() { |
216 test_server_.AddDefaultHandlers(base::FilePath(kDocRoot)); | 217 test_server_.AddDefaultHandlers(base::FilePath(kDocRoot)); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 TestCompletionCallback callback; | 579 TestCompletionCallback callback; |
579 int result = pac_fetcher.Fetch(test_server_.GetURL("/hung"), &text, | 580 int result = pac_fetcher.Fetch(test_server_.GetURL("/hung"), &text, |
580 callback.callback()); | 581 callback.callback()); |
581 EXPECT_THAT(result, IsError(ERR_CONTEXT_SHUT_DOWN)); | 582 EXPECT_THAT(result, IsError(ERR_CONTEXT_SHUT_DOWN)); |
582 EXPECT_EQ(0u, context_.url_requests().size()); | 583 EXPECT_EQ(0u, context_.url_requests().size()); |
583 } | 584 } |
584 | 585 |
585 } // namespace | 586 } // namespace |
586 | 587 |
587 } // namespace net | 588 } // namespace net |
OLD | NEW |