| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 path = path.AppendASCII("proxy_script_fetcher_unittest"); | 111 path = path.AppendASCII("proxy_script_fetcher_unittest"); |
| 112 GURL base_url = FilePathToFileURL(path); | 112 GURL base_url = FilePathToFileURL(path); |
| 113 return GURL(base_url.spec() + "/" + relpath); | 113 return GURL(base_url.spec() + "/" + relpath); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace | 116 } // namespace |
| 117 | 117 |
| 118 class ProxyScriptFetcherImplTest : public PlatformTest { | 118 class ProxyScriptFetcherImplTest : public PlatformTest { |
| 119 public: | 119 public: |
| 120 ProxyScriptFetcherImplTest() | 120 ProxyScriptFetcherImplTest() |
| 121 : test_server_(TestServer::TYPE_HTTP, FilePath(kDocRoot)) { | 121 : test_server_(TestServer::TYPE_HTTP, |
| 122 net::TestServer::kLocalhost, |
| 123 FilePath(kDocRoot)) { |
| 122 } | 124 } |
| 123 | 125 |
| 124 static void SetUpTestCase() { | 126 static void SetUpTestCase() { |
| 125 URLRequest::AllowFileAccess(); | 127 URLRequest::AllowFileAccess(); |
| 126 } | 128 } |
| 127 | 129 |
| 128 protected: | 130 protected: |
| 129 TestServer test_server_; | 131 TestServer test_server_; |
| 130 }; | 132 }; |
| 131 | 133 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 { | 408 { |
| 407 GURL url(kEncodedUrlBroken); | 409 GURL url(kEncodedUrlBroken); |
| 408 string16 text; | 410 string16 text; |
| 409 TestCompletionCallback callback; | 411 TestCompletionCallback callback; |
| 410 int result = pac_fetcher.Fetch(url, &text, callback.callback()); | 412 int result = pac_fetcher.Fetch(url, &text, callback.callback()); |
| 411 EXPECT_EQ(ERR_FAILED, result); | 413 EXPECT_EQ(ERR_FAILED, result); |
| 412 } | 414 } |
| 413 } | 415 } |
| 414 | 416 |
| 415 } // namespace net | 417 } // namespace net |
| OLD | NEW |