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

Side by Side Diff: chrome/test/perf/startup_test.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
« no previous file with comments | « chrome/test/perf/rendering/throughput_tests.cc ('k') | chrome/test/perf/tab_switching_test.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) 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/environment.h" 5 #include "base/environment.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 const base::FilePath pref_template_path(user_data_dir(). 111 const base::FilePath pref_template_path(user_data_dir().
112 AppendASCII("Default"). 112 AppendASCII("Default").
113 AppendASCII("PreferencesTemplate")); 113 AppendASCII("PreferencesTemplate"));
114 const base::FilePath pref_path(user_data_dir(). 114 const base::FilePath pref_path(user_data_dir().
115 AppendASCII(TestingProfile::kTestUserProfileDir). 115 AppendASCII(TestingProfile::kTestUserProfileDir).
116 AppendASCII("Preferences")); 116 AppendASCII("Preferences"));
117 117
118 // Read in preferences template. 118 // Read in preferences template.
119 std::string pref_string; 119 std::string pref_string;
120 EXPECT_TRUE(file_util::ReadFileToString(pref_template_path, &pref_string)); 120 EXPECT_TRUE(base::ReadFileToString(pref_template_path, &pref_string));
121 string16 format_string = ASCIIToUTF16(pref_string); 121 string16 format_string = ASCIIToUTF16(pref_string);
122 122
123 // Make sure temp directory has the proper format for writing to prefs file. 123 // Make sure temp directory has the proper format for writing to prefs file.
124 #if defined(OS_POSIX) 124 #if defined(OS_POSIX)
125 std::wstring user_data_dir_w(ASCIIToWide(user_data_dir().value())); 125 std::wstring user_data_dir_w(ASCIIToWide(user_data_dir().value()));
126 #elif defined(OS_WIN) 126 #elif defined(OS_WIN)
127 std::wstring user_data_dir_w(user_data_dir().value()); 127 std::wstring user_data_dir_w(user_data_dir().value());
128 // In Windows, the FilePath will write '\' for the path separators; change 128 // In Windows, the FilePath will write '\' for the path separators; change
129 // these to a separator that won't trigger escapes. 129 // these to a separator that won't trigger escapes.
130 std::replace(user_data_dir_w.begin(), 130 std::replace(user_data_dir_w.begin(),
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 472 }
473 473
474 TEST_F(StartupTest, ProfilingScript1) { 474 TEST_F(StartupTest, ProfilingScript1) {
475 SetUpWithFileURL(); 475 SetUpWithFileURL();
476 SetUpWithProfiling(); 476 SetUpWithProfiling();
477 RunStartupTest("warm", "profiling_scripts1", WARM, NOT_IMPORTANT, 477 RunStartupTest("warm", "profiling_scripts1", WARM, NOT_IMPORTANT,
478 PerfUITestSuite::DEFAULT_THEME, 1, 0); 478 PerfUITestSuite::DEFAULT_THEME, 1, 0);
479 } 479 }
480 480
481 } // namespace 481 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/perf/rendering/throughput_tests.cc ('k') | chrome/test/perf/tab_switching_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698