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

Side by Side Diff: chrome/browser/net/proxy_browsertest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 // Fetch PAC script via a data: URL. 229 // Fetch PAC script via a data: URL.
230 class DataProxyScriptBrowserTest : public InProcessBrowserTest { 230 class DataProxyScriptBrowserTest : public InProcessBrowserTest {
231 public: 231 public:
232 DataProxyScriptBrowserTest() {} 232 DataProxyScriptBrowserTest() {}
233 virtual ~DataProxyScriptBrowserTest() {} 233 virtual ~DataProxyScriptBrowserTest() {}
234 234
235 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 235 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
236 std::string contents; 236 std::string contents;
237 // Read in kPACScript contents. 237 // Read in kPACScript contents.
238 ASSERT_TRUE(file_util::ReadFileToString(ui_test_utils::GetTestFilePath( 238 ASSERT_TRUE(base::ReadFileToString(ui_test_utils::GetTestFilePath(
239 base::FilePath(base::FilePath::kCurrentDirectory), 239 base::FilePath(base::FilePath::kCurrentDirectory),
240 base::FilePath(kPACScript)), 240 base::FilePath(kPACScript)),
241 &contents)); 241 &contents));
242 command_line->AppendSwitchASCII(switches::kProxyPacUrl, 242 command_line->AppendSwitchASCII(switches::kProxyPacUrl,
243 std::string("data:,") + contents); 243 std::string("data:,") + contents);
244 } 244 }
245 245
246 private: 246 private:
247 DISALLOW_COPY_AND_ASSIGN(DataProxyScriptBrowserTest); 247 DISALLOW_COPY_AND_ASSIGN(DataProxyScriptBrowserTest);
248 }; 248 };
249 249
250 IN_PROC_BROWSER_TEST_F(DataProxyScriptBrowserTest, Verify) { 250 IN_PROC_BROWSER_TEST_F(DataProxyScriptBrowserTest, Verify) {
251 VerifyProxyScript(browser()); 251 VerifyProxyScript(browser());
252 } 252 }
253 253
254 } // namespace 254 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/net/firefox_proxy_settings.cc ('k') | chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698