| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool OnCanAccessFile(const net::URLRequest& request, | 174 bool OnCanAccessFile(const net::URLRequest& request, |
| 175 const base::FilePath& path) const override { | 175 const base::FilePath& path) const override { |
| 176 return true; | 176 return true; |
| 177 } | 177 } |
| 178 bool OnCanThrottleRequest(const URLRequest& request) const override { | 178 bool OnCanThrottleRequest(const URLRequest& request) const override { |
| 179 return false; | 179 return false; |
| 180 } | 180 } |
| 181 | 181 |
| 182 int OnBeforeSocketStreamConnect(SocketStream* stream, | |
| 183 const CompletionCallback& callback) override { | |
| 184 return OK; | |
| 185 } | |
| 186 | |
| 187 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 182 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
| 188 }; | 183 }; |
| 189 | 184 |
| 190 } // namespace | 185 } // namespace |
| 191 | 186 |
| 192 class ProxyScriptFetcherImplTest : public PlatformTest { | 187 class ProxyScriptFetcherImplTest : public PlatformTest { |
| 193 public: | 188 public: |
| 194 ProxyScriptFetcherImplTest() | 189 ProxyScriptFetcherImplTest() |
| 195 : test_server_(SpawnedTestServer::TYPE_HTTP, | 190 : test_server_(SpawnedTestServer::TYPE_HTTP, |
| 196 net::SpawnedTestServer::kLocalhost, | 191 net::SpawnedTestServer::kLocalhost, |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 { | 475 { |
| 481 GURL url(kEncodedUrlBroken); | 476 GURL url(kEncodedUrlBroken); |
| 482 base::string16 text; | 477 base::string16 text; |
| 483 TestCompletionCallback callback; | 478 TestCompletionCallback callback; |
| 484 int result = pac_fetcher.Fetch(url, &text, callback.callback()); | 479 int result = pac_fetcher.Fetch(url, &text, callback.callback()); |
| 485 EXPECT_EQ(ERR_FAILED, result); | 480 EXPECT_EQ(ERR_FAILED, result); |
| 486 } | 481 } |
| 487 } | 482 } |
| 488 | 483 |
| 489 } // namespace net | 484 } // namespace net |
| OLD | NEW |