| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 NOT_IMPORTANT, | 53 NOT_IMPORTANT, |
| 54 IMPORTANT | 54 IMPORTANT |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 // Load a file on startup rather than about:blank. This tests a longer | 57 // Load a file on startup rather than about:blank. This tests a longer |
| 58 // startup path, including resource loading. | 58 // startup path, including resource loading. |
| 59 void SetUpWithFileURL() { | 59 void SetUpWithFileURL() { |
| 60 const base::FilePath file_url = ui_test_utils::GetTestFilePath( | 60 const base::FilePath file_url = ui_test_utils::GetTestFilePath( |
| 61 base::FilePath(base::FilePath::kCurrentDirectory), | 61 base::FilePath(base::FilePath::kCurrentDirectory), |
| 62 base::FilePath(FILE_PATH_LITERAL("simple.html"))); | 62 base::FilePath(FILE_PATH_LITERAL("simple.html"))); |
| 63 ASSERT_TRUE(file_util::PathExists(file_url)); | 63 ASSERT_TRUE(base::PathExists(file_url)); |
| 64 launch_arguments_.AppendArgPath(file_url); | 64 launch_arguments_.AppendArgPath(file_url); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // Setup the command line arguments to capture profiling data for tasks. | 67 // Setup the command line arguments to capture profiling data for tasks. |
| 68 void SetUpWithProfiling() { | 68 void SetUpWithProfiling() { |
| 69 profiling_file_ = ui_test_utils::GetTestFilePath( | 69 profiling_file_ = ui_test_utils::GetTestFilePath( |
| 70 base::FilePath(base::FilePath::kCurrentDirectory), | 70 base::FilePath(base::FilePath::kCurrentDirectory), |
| 71 base::FilePath(FILE_PATH_LITERAL("task_profile.json"))); | 71 base::FilePath(FILE_PATH_LITERAL("task_profile.json"))); |
| 72 launch_arguments_.AppendSwitchPath(switches::kProfilingOutputFile, | 72 launch_arguments_.AppendSwitchPath(switches::kProfilingOutputFile, |
| 73 profiling_file_); | 73 profiling_file_); |
| (...skipping 398 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 |