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

Side by Side Diff: chrome/test/perf/startup_test.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/shutdown_test.cc ('k') | chrome/test/ppapi/ppapi_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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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/shutdown_test.cc ('k') | chrome/test/ppapi/ppapi_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698