| 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/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 177 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 } // namespace | 180 } // namespace |
| 181 | 181 |
| 182 class ProxyScriptFetcherImplTest : public PlatformTest { | 182 class ProxyScriptFetcherImplTest : public PlatformTest { |
| 183 public: | 183 public: |
| 184 ProxyScriptFetcherImplTest() | 184 ProxyScriptFetcherImplTest() |
| 185 : test_server_(TestServer::TYPE_HTTP, | 185 : test_server_(TestServer::TYPE_HTTP, |
| 186 net::TestServer::kLocalhost, | 186 net::TestServer::kLocalhost, |
| 187 base::FilePath(kDocRoot)) { | 187 net::TestServer::GetSourceRelativePath( |
| 188 base::FilePath(kDocRoot))) { |
| 188 context_.set_network_delegate(&network_delegate_); | 189 context_.set_network_delegate(&network_delegate_); |
| 189 } | 190 } |
| 190 | 191 |
| 191 protected: | 192 protected: |
| 192 TestServer test_server_; | 193 TestServer test_server_; |
| 193 BasicNetworkDelegate network_delegate_; | 194 BasicNetworkDelegate network_delegate_; |
| 194 RequestContext context_; | 195 RequestContext context_; |
| 195 }; | 196 }; |
| 196 | 197 |
| 197 TEST_F(ProxyScriptFetcherImplTest, FileUrl) { | 198 TEST_F(ProxyScriptFetcherImplTest, FileUrl) { |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 { | 474 { |
| 474 GURL url(kEncodedUrlBroken); | 475 GURL url(kEncodedUrlBroken); |
| 475 string16 text; | 476 string16 text; |
| 476 TestCompletionCallback callback; | 477 TestCompletionCallback callback; |
| 477 int result = pac_fetcher.Fetch(url, &text, callback.callback()); | 478 int result = pac_fetcher.Fetch(url, &text, callback.callback()); |
| 478 EXPECT_EQ(ERR_FAILED, result); | 479 EXPECT_EQ(ERR_FAILED, result); |
| 479 } | 480 } |
| 480 } | 481 } |
| 481 | 482 |
| 482 } // namespace net | 483 } // namespace net |
| OLD | NEW |