Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: net/proxy/proxy_script_fetcher_unittest.cc

Issue 18499: Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII(""). (Closed)
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/disk_cache/disk_cache_perftest.cc ('k') | net/tools/tld_cleanup/tld_cleanup.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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.h" 5 #include "net/proxy/proxy_script_fetcher.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 template<> 147 template<>
148 void RunnableMethodTraits<SynchFetcher>::ReleaseCallee(SynchFetcher* remover) {} 148 void RunnableMethodTraits<SynchFetcher>::ReleaseCallee(SynchFetcher* remover) {}
149 149
150 // Required to be in net namespace by FRIEND_TEST. 150 // Required to be in net namespace by FRIEND_TEST.
151 namespace net { 151 namespace net {
152 152
153 // Get a file:// url relative to net/data/proxy/proxy_script_fetcher_unittest. 153 // Get a file:// url relative to net/data/proxy/proxy_script_fetcher_unittest.
154 GURL GetTestFileUrl(const std::string& relpath) { 154 GURL GetTestFileUrl(const std::string& relpath) {
155 FilePath path; 155 FilePath path;
156 PathService::Get(base::DIR_SOURCE_ROOT, &path); 156 PathService::Get(base::DIR_SOURCE_ROOT, &path);
157 path = path.Append(FILE_PATH_LITERAL("net")); 157 path = path.AppendASCII("net");
158 path = path.Append(FILE_PATH_LITERAL("data")); 158 path = path.AppendASCII("data");
159 path = path.Append(FILE_PATH_LITERAL("proxy_script_fetcher_unittest")); 159 path = path.AppendASCII("proxy_script_fetcher_unittest");
160 GURL base_url = net::FilePathToFileURL(path); 160 GURL base_url = net::FilePathToFileURL(path);
161 return GURL(base_url.spec() + "/" + relpath); 161 return GURL(base_url.spec() + "/" + relpath);
162 } 162 }
163 163
164 typedef PlatformTest ProxyScriptFetcherTest; 164 typedef PlatformTest ProxyScriptFetcherTest;
165 165
166 TEST_F(ProxyScriptFetcherTest, FileUrl) { 166 TEST_F(ProxyScriptFetcherTest, FileUrl) {
167 SynchFetcher pac_fetcher; 167 SynchFetcher pac_fetcher;
168 168
169 { // Fetch a non-existent file. 169 { // Fetch a non-existent file.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 { // Make sure we can still fetch regular URLs. 299 { // Make sure we can still fetch regular URLs.
300 GURL url = server->TestServerPage("files/pac.nsproxy"); 300 GURL url = server->TestServerPage("files/pac.nsproxy");
301 FetchResult result = pac_fetcher.Fetch(url); 301 FetchResult result = pac_fetcher.Fetch(url);
302 EXPECT_EQ(net::OK, result.code); 302 EXPECT_EQ(net::OK, result.code);
303 EXPECT_EQ("-pac.nsproxy-\n", result.bytes); 303 EXPECT_EQ("-pac.nsproxy-\n", result.bytes);
304 } 304 }
305 } 305 }
306 306
307 } // namespace net 307 } // namespace net
OLDNEW
« no previous file with comments | « net/disk_cache/disk_cache_perftest.cc ('k') | net/tools/tld_cleanup/tld_cleanup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698