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/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 ASSERT_TRUE(PathService::Get(chrome::DIR_APP, &dir_app)); | 232 ASSERT_TRUE(PathService::Get(chrome::DIR_APP, &dir_app)); |
233 | 233 |
234 base::FilePath chrome_exe(dir_app.Append(GetExecutablePath())); | 234 base::FilePath chrome_exe(dir_app.Append(GetExecutablePath())); |
235 ASSERT_TRUE(EvictFileFromSystemCacheWrapper(chrome_exe)); | 235 ASSERT_TRUE(EvictFileFromSystemCacheWrapper(chrome_exe)); |
236 #if defined(OS_WIN) | 236 #if defined(OS_WIN) |
237 // chrome.dll is windows specific. | 237 // chrome.dll is windows specific. |
238 base::FilePath chrome_dll( | 238 base::FilePath chrome_dll( |
239 dir_app.Append(FILE_PATH_LITERAL("chrome.dll"))); | 239 dir_app.Append(FILE_PATH_LITERAL("chrome.dll"))); |
240 ASSERT_TRUE(EvictFileFromSystemCacheWrapper(chrome_dll)); | 240 ASSERT_TRUE(EvictFileFromSystemCacheWrapper(chrome_dll)); |
241 #endif | 241 #endif |
| 242 |
| 243 // Kick out the profile files. |
| 244 file_util::FileEnumerator en(user_data_dir(), true, |
| 245 file_util::FileEnumerator::FILES); |
| 246 for (base::FilePath cur = en.Next(); !cur.empty(); cur = en.Next()) |
| 247 EvictFileFromSystemCacheWrapper(cur); |
242 } | 248 } |
243 UITest::SetUp(); | 249 UITest::SetUp(); |
244 TimeTicks end_time = TimeTicks::Now(); | 250 TimeTicks end_time = TimeTicks::Now(); |
245 | 251 |
246 if (num_tabs > 0) { | 252 if (num_tabs > 0) { |
247 float min_start; | 253 float min_start; |
248 float max_stop; | 254 float max_stop; |
249 std::vector<float> times; | 255 std::vector<float> times; |
250 scoped_refptr<BrowserProxy> browser_proxy( | 256 scoped_refptr<BrowserProxy> browser_proxy( |
251 automation()->GetBrowserWindow(0)); | 257 automation()->GetBrowserWindow(0)); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 SetUpWithFileURL(); | 526 SetUpWithFileURL(); |
521 SetUpWithProfiling(); | 527 SetUpWithProfiling(); |
522 SetUpWithForceCompositingMode(); | 528 SetUpWithForceCompositingMode(); |
523 SetUpWithTracing("startup_trace_fcm_"); | 529 SetUpWithTracing("startup_trace_fcm_"); |
524 RunStartupTest("warm", "traced_profiling_scripts1_fcm", WARM, NOT_IMPORTANT, | 530 RunStartupTest("warm", "traced_profiling_scripts1_fcm", WARM, NOT_IMPORTANT, |
525 UITestBase::DEFAULT_THEME, 1, 0); | 531 UITestBase::DEFAULT_THEME, 1, 0); |
526 } | 532 } |
527 #endif | 533 #endif |
528 | 534 |
529 } // namespace | 535 } // namespace |
OLD | NEW |