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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |