summaryrefslogtreecommitdiffstats
path: root/chrome/test/perf
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-11 04:08:40 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-11 04:08:40 +0000
commit152ea305aa6528244310077cac67afc8df71bb5a (patch)
treec835ca1bd19a49492aaa8959ef8242c28d072f65 /chrome/test/perf
parent2074e5e82dee830ce07695cd71a1fe04d782f924 (diff)
downloadchromium_src-152ea305aa6528244310077cac67afc8df71bb5a.zip
chromium_src-152ea305aa6528244310077cac67afc8df71bb5a.tar.gz
chromium_src-152ea305aa6528244310077cac67afc8df71bb5a.tar.bz2
Move FilePath->base::FilePath
Review URL: https://codereview.chromium.org/12213104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/perf')
-rw-r--r--chrome/test/perf/dom_checker_uitest.cc20
-rw-r--r--chrome/test/perf/frame_rate/frame_rate_tests.cc6
-rw-r--r--chrome/test/perf/indexeddb_uitest.cc10
-rw-r--r--chrome/test/perf/memory_test.cc20
-rw-r--r--chrome/test/perf/page_cycler_test.cc54
-rw-r--r--chrome/test/perf/rendering/latency_tests.cc2
-rw-r--r--chrome/test/perf/rendering/throughput_tests.cc14
-rw-r--r--chrome/test/perf/shutdown_test.cc16
-rw-r--r--chrome/test/perf/startup_test.cc29
-rw-r--r--chrome/test/perf/tab_switching_test.cc6
-rw-r--r--chrome/test/perf/url_fetch_test.cc7
11 files changed, 93 insertions, 91 deletions
diff --git a/chrome/test/perf/dom_checker_uitest.cc b/chrome/test/perf/dom_checker_uitest.cc
index be5f243..aca6b4b 100644
--- a/chrome/test/perf/dom_checker_uitest.cc
+++ b/chrome/test/perf/dom_checker_uitest.cc
@@ -22,13 +22,13 @@
namespace {
-static const FilePath::CharType kBaseUrl[] =
+static const base::FilePath::CharType kBaseUrl[] =
FILE_PATH_LITERAL("http://localhost:8000/");
-static const FilePath::CharType kTestDirectory[] =
+static const base::FilePath::CharType kTestDirectory[] =
FILE_PATH_LITERAL("dom_checker/");
-static const FilePath::CharType kStartFile[] =
+static const base::FilePath::CharType kStartFile[] =
FILE_PATH_LITERAL("dom_checker.html");
const char kRunDomCheckerTest[] = "run-dom-checker-test";
@@ -103,15 +103,15 @@ class DomCheckerTest : public UITest {
}
// Return the path to the DOM checker directory on the local filesystem.
- FilePath GetDomCheckerDir() {
- FilePath test_dir;
+ base::FilePath GetDomCheckerDir() {
+ base::FilePath test_dir;
PathService::Get(chrome::DIR_TEST_DATA, &test_dir);
return test_dir.AppendASCII("dom_checker");
}
bool ReadExpectedResults(const std::string& failures_file,
std::string* results) {
- FilePath results_path = GetDomCheckerDir();
+ base::FilePath results_path = GetDomCheckerDir();
results_path = results_path.AppendASCII(failures_file);
return file_util::ReadFileToString(results_path, results);
}
@@ -200,15 +200,15 @@ class DomCheckerTest : public UITest {
void RunDomChecker(bool use_http, int* test_count, ResultsSet* tests_failed) {
GURL test_url;
- FilePath::StringType start_file(kStartFile);
+ base::FilePath::StringType start_file(kStartFile);
if (use_http) {
- FilePath::StringType test_directory(kTestDirectory);
- FilePath::StringType url_string(kBaseUrl);
+ base::FilePath::StringType test_directory(kTestDirectory);
+ base::FilePath::StringType url_string(kBaseUrl);
url_string.append(test_directory);
url_string.append(start_file);
test_url = GURL(url_string);
} else {
- FilePath test_path = GetDomCheckerDir();
+ base::FilePath test_path = GetDomCheckerDir();
test_path = test_path.Append(start_file);
test_url = net::FilePathToFileURL(test_path);
}
diff --git a/chrome/test/perf/frame_rate/frame_rate_tests.cc b/chrome/test/perf/frame_rate/frame_rate_tests.cc
index 429db86..7be2b36 100644
--- a/chrome/test/perf/frame_rate/frame_rate_tests.cc
+++ b/chrome/test/perf/frame_rate/frame_rate_tests.cc
@@ -71,9 +71,9 @@ class FrameRateTest
return suffix;
}
- virtual FilePath GetDataPath(const std::string& name) {
+ virtual base::FilePath GetDataPath(const std::string& name) {
// Make sure the test data is checked out.
- FilePath test_path;
+ base::FilePath test_path;
PathService::Get(chrome::DIR_TEST_DATA, &test_path);
test_path = test_path.Append(FILE_PATH_LITERAL("perf"));
test_path = test_path.Append(FILE_PATH_LITERAL("frame_rate"));
@@ -161,7 +161,7 @@ class FrameRateTest
ASSERT_TRUE(HasFlag(kUseGpu) || !HasFlag(kForceGpuComposited));
ASSERT_TRUE(!HasFlag(kUseGpu) || IsGpuAvailable());
- FilePath test_path = GetDataPath(name);
+ base::FilePath test_path = GetDataPath(name);
ASSERT_TRUE(file_util::DirectoryExists(test_path))
<< "Missing test directory: " << test_path.value();
diff --git a/chrome/test/perf/indexeddb_uitest.cc b/chrome/test/perf/indexeddb_uitest.cc
index 0014d17..22ef5dc 100644
--- a/chrome/test/perf/indexeddb_uitest.cc
+++ b/chrome/test/perf/indexeddb_uitest.cc
@@ -17,7 +17,7 @@
namespace {
-static const FilePath::CharType kStartFile[] =
+static const base::FilePath::CharType kStartFile[] =
FILE_PATH_LITERAL("perf_test.html");
class IndexedDBTest : public UIPerfTest {
@@ -30,8 +30,8 @@ class IndexedDBTest : public UIPerfTest {
}
void RunTest() {
- FilePath::StringType start_file(kStartFile);
- FilePath test_path = GetIndexedDBTestDir();
+ base::FilePath::StringType start_file(kStartFile);
+ base::FilePath test_path = GetIndexedDBTestDir();
test_path = test_path.Append(start_file);
GURL test_url(net::FilePathToFileURL(test_path));
@@ -50,8 +50,8 @@ class IndexedDBTest : public UIPerfTest {
private:
// Return the path to the IndexedDB test directory on the local filesystem.
- FilePath GetIndexedDBTestDir() {
- FilePath test_dir;
+ base::FilePath GetIndexedDBTestDir() {
+ base::FilePath test_dir;
PathService::Get(chrome::DIR_TEST_DATA, &test_dir);
return test_dir.AppendASCII("indexeddb");
}
diff --git a/chrome/test/perf/memory_test.cc b/chrome/test/perf/memory_test.cc
index 9186156..add948b 100644
--- a/chrome/test/perf/memory_test.cc
+++ b/chrome/test/perf/memory_test.cc
@@ -28,7 +28,7 @@
namespace {
-static const FilePath::CharType kTempDirName[] =
+static const base::FilePath::CharType kTempDirName[] =
FILE_PATH_LITERAL("memory_test_profile");
class MemoryTest : public UIPerfTest {
@@ -42,7 +42,7 @@ class MemoryTest : public UIPerfTest {
}
// Called from SetUp() to determine the user data dir to copy.
- virtual FilePath GetUserDataDirSource() const = 0;
+ virtual base::FilePath GetUserDataDirSource() const = 0;
// Called from RunTest() to determine the set of URLs to retrieve.
// Returns the length of the list.
@@ -69,7 +69,7 @@ class MemoryTest : public UIPerfTest {
launch_arguments_.AppendSwitch(switches::kNoEvents);
// Get the specified user data dir (optional)
- FilePath profile_dir =
+ base::FilePath profile_dir =
CommandLine::ForCurrentProcess()->GetSwitchValuePath(
switches::kUserDataDir);
@@ -217,7 +217,7 @@ class MemoryTest : public UIPerfTest {
// On success, modifies user_data_dir_ to be a new profile directory
// sets temp_dir_ to the containing temporary directory,
// and sets cleanup_temp_dir_on_exit_ to true.
- bool SetupTempDirectory(const FilePath& src_dir) {
+ bool SetupTempDirectory(const base::FilePath& src_dir) {
VLOG(1) << "Setting up temp directory in " << src_dir.value();
// We create a copy of the test dir and use it so that each
// run of this test starts with the same data. Running this
@@ -241,15 +241,15 @@ class MemoryTest : public UIPerfTest {
}
bool cleanup_temp_dir_on_exit_;
- FilePath temp_dir_;
- FilePath user_data_dir_;
+ base::FilePath temp_dir_;
+ base::FilePath user_data_dir_;
base::ThreadRestrictions::ScopedAllowIO allow_io_;
};
class GeneralMixMemoryTest : public MemoryTest {
public:
- virtual FilePath GetUserDataDirSource() const {
- FilePath profile_dir;
+ virtual base::FilePath GetUserDataDirSource() const {
+ base::FilePath profile_dir;
PathService::Get(base::DIR_SOURCE_ROOT, &profile_dir);
profile_dir = profile_dir.AppendASCII("data");
profile_dir = profile_dir.AppendASCII("memory_test");
@@ -413,8 +413,8 @@ class MembusterMemoryTest : public MemoryTest {
delete[] test_urls_;
}
- virtual FilePath GetUserDataDirSource() const {
- FilePath profile_dir;
+ virtual base::FilePath GetUserDataDirSource() const {
+ base::FilePath profile_dir;
PathService::Get(base::DIR_SOURCE_ROOT, &profile_dir);
profile_dir = profile_dir.AppendASCII("data");
profile_dir = profile_dir.AppendASCII("memory_test");
diff --git a/chrome/test/perf/page_cycler_test.cc b/chrome/test/perf/page_cycler_test.cc
index 6f51883..3366514 100644
--- a/chrome/test/perf/page_cycler_test.cc
+++ b/chrome/test/perf/page_cycler_test.cc
@@ -51,7 +51,7 @@ static const char kWebPageReplayHttpsPort[] = "8413";
namespace {
-void PopulateBufferCache(const FilePath& test_dir) {
+void PopulateBufferCache(const base::FilePath& test_dir) {
// This will recursively walk the directory given and read all the
// files it finds. This is done so the system file cache is likely
// to have as much loaded as possible. Without this, the tests of
@@ -63,14 +63,14 @@ void PopulateBufferCache(const FilePath& test_dir) {
// We don't want to walk into .svn dirs, so we have to do the tree walk
// ourselves.
- std::vector<FilePath> dirs;
+ std::vector<base::FilePath> dirs;
dirs.push_back(test_dir);
- const FilePath svn_dir(FILE_PATH_LITERAL(".svn"));
+ const base::FilePath svn_dir(FILE_PATH_LITERAL(".svn"));
for (size_t idx = 0; idx < dirs.size(); ++idx) {
file_util::FileEnumerator dir_enumerator(dirs[idx], false,
file_util::FileEnumerator::DIRECTORIES);
- FilePath path;
+ base::FilePath path;
for (path = dir_enumerator.Next();
!path.empty();
path = dir_enumerator.Next()) {
@@ -83,27 +83,27 @@ void PopulateBufferCache(const FilePath& test_dir) {
// We seem to have some files in the data dirs that are just there for
// reference, make a quick attempt to skip them by matching suffixes.
- std::vector<FilePath::StringType> ignore_suffixes;
+ std::vector<base::FilePath::StringType> ignore_suffixes;
ignore_suffixes.push_back(FILE_PATH_LITERAL(".orig.html"));
ignore_suffixes.push_back(FILE_PATH_LITERAL(".html-original"));
- std::vector<FilePath>::const_iterator iter;
+ std::vector<base::FilePath>::const_iterator iter;
for (iter = dirs.begin(); iter != dirs.end(); ++iter) {
file_util::FileEnumerator file_enumerator(*iter, false,
file_util::FileEnumerator::FILES);
- FilePath path;
+ base::FilePath path;
for (path = file_enumerator.Next();
!path.empty();
path = file_enumerator.Next()) {
- const FilePath base_name = path.BaseName();
+ const base::FilePath base_name = path.BaseName();
const size_t base_name_size = base_name.value().size();
bool should_skip = false;
- std::vector<FilePath::StringType>::const_iterator ignore_iter;
+ std::vector<base::FilePath::StringType>::const_iterator ignore_iter;
for (ignore_iter = ignore_suffixes.begin();
ignore_iter != ignore_suffixes.end();
++ignore_iter) {
- const FilePath::StringType &suffix = *ignore_iter;
+ const base::FilePath::StringType &suffix = *ignore_iter;
if ((base_name_size > suffix.size()) &&
(base_name.value().compare(base_name_size - suffix.size(),
@@ -147,9 +147,9 @@ class PageCyclerTest : public UIPerfTest {
"--expose_gc");
}
- virtual FilePath GetDataPath(const char* name) {
+ virtual base::FilePath GetDataPath(const char* name) {
// Make sure the test data is checked out
- FilePath test_path;
+ base::FilePath test_path;
PathService::Get(base::DIR_SOURCE_ROOT, &test_path);
test_path = test_path.Append(FILE_PATH_LITERAL("data"));
test_path = test_path.Append(FILE_PATH_LITERAL("page_cycler"));
@@ -166,7 +166,7 @@ class PageCyclerTest : public UIPerfTest {
}
virtual void GetTestUrl(const char* name, bool use_http, GURL *test_url) {
- FilePath test_path = GetDataPath(name);
+ base::FilePath test_path = GetDataPath(name);
ASSERT_TRUE(file_util::DirectoryExists(test_path))
<< "Missing test directory " << test_path.value();
PopulateBufferCache(test_path);
@@ -324,7 +324,7 @@ class PageCyclerExtensionTest : public PageCyclerTest {
const char* output_suffix, const char* name, bool use_http) {
// Set up the extension profile directory.
ASSERT_TRUE(extension_profile != NULL);
- FilePath data_dir;
+ base::FilePath data_dir;
PathService::Get(chrome::DIR_TEST_DATA, &data_dir);
data_dir = data_dir.AppendASCII("extensions").AppendASCII("profiles").
AppendASCII(extension_profile);
@@ -347,8 +347,8 @@ class PageCyclerExtensionWebRequestTest : public PageCyclerExtensionTest {
}
};
-static FilePath GetDatabaseDataPath(const char* name) {
- FilePath test_path;
+static base::FilePath GetDatabaseDataPath(const char* name) {
+ base::FilePath test_path;
PathService::Get(base::DIR_SOURCE_ROOT, &test_path);
test_path = test_path.Append(FILE_PATH_LITERAL("tools"));
test_path = test_path.Append(FILE_PATH_LITERAL("page_cycler"));
@@ -357,8 +357,8 @@ static FilePath GetDatabaseDataPath(const char* name) {
return test_path;
}
-static FilePath GetIndexedDatabaseDataPath(const char* name) {
- FilePath test_path;
+static base::FilePath GetIndexedDatabaseDataPath(const char* name) {
+ base::FilePath test_path;
PathService::Get(base::DIR_SOURCE_ROOT, &test_path);
test_path = test_path.Append(FILE_PATH_LITERAL("tools"));
test_path = test_path.Append(FILE_PATH_LITERAL("page_cycler"));
@@ -411,7 +411,7 @@ class PageCyclerDatabaseTest : public PageCyclerTest {
print_times_only_ = true;
}
- virtual FilePath GetDataPath(const char* name) {
+ virtual base::FilePath GetDataPath(const char* name) {
return GetDatabaseDataPath(name);
}
@@ -430,7 +430,7 @@ class PageCyclerDatabaseReferenceTest : public PageCyclerReferenceTest {
print_times_only_ = true;
}
- virtual FilePath GetDataPath(const char* name) {
+ virtual base::FilePath GetDataPath(const char* name) {
return GetDatabaseDataPath(name);
}
@@ -449,7 +449,7 @@ class PageCyclerIndexedDatabaseTest : public PageCyclerTest {
print_times_only_ = true;
}
- virtual FilePath GetDataPath(const char* name) {
+ virtual base::FilePath GetDataPath(const char* name) {
return GetIndexedDatabaseDataPath(name);
}
@@ -468,7 +468,7 @@ class PageCyclerIndexedDatabaseReferenceTest : public PageCyclerReferenceTest {
print_times_only_ = true;
}
- virtual FilePath GetDataPath(const char* name) {
+ virtual base::FilePath GetDataPath(const char* name) {
return GetIndexedDatabaseDataPath(name);
}
@@ -489,7 +489,7 @@ class PageCyclerWebPageReplayTest : public PageCyclerTest {
PageCyclerWebPageReplayTest() {
// These Chrome command-line arguments need to be kept in sync
// with src/tools/python/google/webpagereplay_utils.py.
- FilePath extension_path = GetPageCyclerWprPath("extension");
+ base::FilePath extension_path = GetPageCyclerWprPath("extension");
launch_arguments_.AppendSwitchPath(
switches::kLoadExtension, extension_path);
// TODO(slamm): Instead of kHostResolverRules, add a new switch,
@@ -508,8 +508,8 @@ class PageCyclerWebPageReplayTest : public PageCyclerTest {
launch_arguments_.AppendSwitch(switches::kNoProxyServer);
}
- FilePath GetPageCyclerWprPath(const char* name) {
- FilePath wpr_path;
+ base::FilePath GetPageCyclerWprPath(const char* name) {
+ base::FilePath wpr_path;
PathService::Get(base::DIR_SOURCE_ROOT, &wpr_path);
wpr_path = wpr_path.AppendASCII("tools");
wpr_path = wpr_path.AppendASCII("page_cycler");
@@ -524,7 +524,7 @@ class PageCyclerWebPageReplayTest : public PageCyclerTest {
virtual void GetTestUrl(const char* name, bool use_http,
GURL *test_url) OVERRIDE {
- FilePath start_path = GetPageCyclerWprPath("start.html");
+ base::FilePath start_path = GetPageCyclerWprPath("start.html");
// Add query parameters for iterations and test name.
const std::string query_string =
@@ -541,7 +541,7 @@ class PageCyclerWebPageReplayTest : public PageCyclerTest {
}
void RunTest(const char* graph, const char* name) {
- FilePath test_path = GetPageCyclerWprPath("tests");
+ base::FilePath test_path = GetPageCyclerWprPath("tests");
test_path = test_path.AppendASCII(name);
test_path = test_path.ReplaceExtension(FILE_PATH_LITERAL(".js"));
ASSERT_TRUE(file_util::PathExists(test_path))
diff --git a/chrome/test/perf/rendering/latency_tests.cc b/chrome/test/perf/rendering/latency_tests.cc
index 3fbbd7a..b1962c5 100644
--- a/chrome/test/perf/rendering/latency_tests.cc
+++ b/chrome/test/perf/rendering/latency_tests.cc
@@ -170,7 +170,7 @@ class LatencyTest
void PrintEvents(const TraceEventVector& events);
// Path to html file.
- FilePath test_path_;
+ base::FilePath test_path_;
// Query INSTANT events.
Query query_instant_;
diff --git a/chrome/test/perf/rendering/throughput_tests.cc b/chrome/test/perf/rendering/throughput_tests.cc
index 7514bfc..b9e3086 100644
--- a/chrome/test/perf/rendering/throughput_tests.cc
+++ b/chrome/test/perf/rendering/throughput_tests.cc
@@ -76,7 +76,7 @@ class ThroughputTest : public BrowserPerfTest {
}
// Parse flags from JSON to control the test behavior.
- bool ParseFlagsFromJSON(const FilePath& json_dir,
+ bool ParseFlagsFromJSON(const base::FilePath& json_dir,
const std::string& json,
int index) {
scoped_ptr<base::Value> root;
@@ -98,7 +98,7 @@ class ThroughputTest : public BrowserPerfTest {
if (item->GetStringASCII("url", &str)) {
gurl_ = GURL(str);
} else if (item->GetStringASCII("file", &str)) {
- FilePath empty;
+ base::FilePath empty;
gurl_ = URLFixerUpper::FixupRelativeFile(empty, empty.AppendASCII(str));
} else {
LOG(ERROR) << "missing url or file";
@@ -110,7 +110,7 @@ class ThroughputTest : public BrowserPerfTest {
return false;
}
- FilePath::StringType cache_dir;
+ base::FilePath::StringType cache_dir;
if (item->GetString("local_path", &cache_dir))
local_cache_path_ = json_dir.Append(cache_dir);
@@ -154,7 +154,7 @@ class ThroughputTest : public BrowserPerfTest {
int index;
ASSERT_TRUE(base::StringToInt(
flags.substr(num_pos, flags.size() - num_pos), &index));
- FilePath filepath(flags.substr(0, colon_pos));
+ base::FilePath filepath(flags.substr(0, colon_pos));
std::string json;
ASSERT_TRUE(file_util::ReadFileToString(filepath, &json));
ASSERT_TRUE(ParseFlagsFromJSON(filepath.DirName(), json, index));
@@ -260,7 +260,7 @@ class ThroughputTest : public BrowserPerfTest {
// flags is one or more of RunTestFlags OR'd together.
void RunTest(const std::string& test_name, int flags) {
// Set path to test html.
- FilePath test_path;
+ base::FilePath test_path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_path));
test_path = test_path.Append(FILE_PATH_LITERAL("perf"));
if (flags & kInternal)
@@ -279,7 +279,7 @@ class ThroughputTest : public BrowserPerfTest {
// flags is one or more of RunTestFlags OR'd together.
void RunCanvasBenchTest(const std::string& test_name, int flags) {
// Set path to test html.
- FilePath test_path;
+ base::FilePath test_path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_path));
test_path = test_path.Append(FILE_PATH_LITERAL("perf"));
test_path = test_path.Append(FILE_PATH_LITERAL("canvas_bench"));
@@ -440,7 +440,7 @@ class ThroughputTest : public BrowserPerfTest {
bool use_compositor_thread_;
int spinup_time_ms_;
int run_time_ms_;
- FilePath local_cache_path_;
+ base::FilePath local_cache_path_;
GURL gurl_;
scoped_ptr<net::ScopedDefaultHostResolverProc> host_resolver_override_;
scoped_ptr<WaitPixel> wait_for_pixel_;
diff --git a/chrome/test/perf/shutdown_test.cc b/chrome/test/perf/shutdown_test.cc
index b29a617..32117fe 100644
--- a/chrome/test/perf/shutdown_test.cc
+++ b/chrome/test/perf/shutdown_test.cc
@@ -43,17 +43,17 @@ class ShutdownTest : public UIPerfTest {
automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser_proxy.get());
- const FilePath kFastShutdownDir(FILE_PATH_LITERAL("fast_shutdown"));
- const FilePath kCurrentDir(FilePath::kCurrentDirectory);
- const FilePath test_cases[] = {
+ const base::FilePath kFastShutdownDir(FILE_PATH_LITERAL("fast_shutdown"));
+ const base::FilePath kCurrentDir(base::FilePath::kCurrentDirectory);
+ const base::FilePath test_cases[] = {
ui_test_utils::GetTestFilePath(kFastShutdownDir,
- FilePath(FILE_PATH_LITERAL("on_before_unloader.html"))),
+ base::FilePath(FILE_PATH_LITERAL("on_before_unloader.html"))),
ui_test_utils::GetTestFilePath(kCurrentDir,
- FilePath(FILE_PATH_LITERAL("animated-gifs.html"))),
+ base::FilePath(FILE_PATH_LITERAL("animated-gifs.html"))),
ui_test_utils::GetTestFilePath(kCurrentDir,
- FilePath(FILE_PATH_LITERAL("french_page.html"))),
+ base::FilePath(FILE_PATH_LITERAL("french_page.html"))),
ui_test_utils::GetTestFilePath(kCurrentDir,
- FilePath(FILE_PATH_LITERAL("setcookie.html"))),
+ base::FilePath(FILE_PATH_LITERAL("setcookie.html"))),
};
for (size_t i = 0; i < arraysize(test_cases); i++) {
@@ -107,7 +107,7 @@ class ShutdownTest : public UIPerfTest {
clear_profile_ = false;
// Clear template_user_data_ so we don't try to copy it over each time
// through.
- set_template_user_data(FilePath());
+ set_template_user_data(base::FilePath());
}
}
diff --git a/chrome/test/perf/startup_test.cc b/chrome/test/perf/startup_test.cc
index ca9052e..2a8ca54 100644
--- a/chrome/test/perf/startup_test.cc
+++ b/chrome/test/perf/startup_test.cc
@@ -54,9 +54,9 @@ class StartupTest : public UIPerfTest {
// Load a file on startup rather than about:blank. This tests a longer
// startup path, including resource loading.
void SetUpWithFileURL() {
- const FilePath file_url = ui_test_utils::GetTestFilePath(
- FilePath(FilePath::kCurrentDirectory),
- FilePath(FILE_PATH_LITERAL("simple.html")));
+ const base::FilePath file_url = ui_test_utils::GetTestFilePath(
+ base::FilePath(base::FilePath::kCurrentDirectory),
+ base::FilePath(FILE_PATH_LITERAL("simple.html")));
ASSERT_TRUE(file_util::PathExists(file_url));
launch_arguments_.AppendArgPath(file_url);
}
@@ -64,8 +64,8 @@ class StartupTest : public UIPerfTest {
// Setup the command line arguments to capture profiling data for tasks.
void SetUpWithProfiling() {
profiling_file_ = ui_test_utils::GetTestFilePath(
- FilePath(FilePath::kCurrentDirectory),
- FilePath(FILE_PATH_LITERAL("task_profile.json")));
+ base::FilePath(base::FilePath::kCurrentDirectory),
+ base::FilePath(FILE_PATH_LITERAL("task_profile.json")));
launch_arguments_.AppendSwitchPath(switches::kProfilingOutputFile,
profiling_file_);
collect_profiling_stats_ = true;
@@ -80,7 +80,7 @@ class StartupTest : public UIPerfTest {
unsigned int which_el = which_tab % arraysize(kTestPageCyclerDomains);
const char* this_domain = kTestPageCyclerDomains[which_el];
- FilePath page_cycler_path;
+ base::FilePath page_cycler_path;
PathService::Get(base::DIR_SOURCE_ROOT, &page_cycler_path);
page_cycler_path = page_cycler_path.AppendASCII("data")
.AppendASCII("page_cycler").AppendASCII("moz")
@@ -92,7 +92,7 @@ class StartupTest : public UIPerfTest {
// Use the given profile in the test data extensions/profiles dir. This tests
// startup with extensions installed.
void SetUpWithExtensionsProfile(const char* profile) {
- FilePath data_dir;
+ base::FilePath data_dir;
PathService::Get(chrome::DIR_TEST_DATA, &data_dir);
data_dir = data_dir.AppendASCII("extensions").AppendASCII("profiles").
AppendASCII(profile);
@@ -105,10 +105,10 @@ class StartupTest : public UIPerfTest {
if (profile_type_ != UITestBase::COMPLEX_THEME)
return;
- const FilePath pref_template_path(user_data_dir().
+ const base::FilePath pref_template_path(user_data_dir().
AppendASCII("Default").
AppendASCII("PreferencesTemplate"));
- const FilePath pref_path(user_data_dir().
+ const base::FilePath pref_path(user_data_dir().
AppendASCII(TestingProfile::kTestUserProfileDir).
AppendASCII("Preferences"));
@@ -193,14 +193,15 @@ class StartupTest : public UIPerfTest {
for (int i = 0; i < numCycles; ++i) {
if (test_cold == COLD) {
- FilePath dir_app;
+ base::FilePath dir_app;
ASSERT_TRUE(PathService::Get(chrome::DIR_APP, &dir_app));
- FilePath chrome_exe(dir_app.Append(GetExecutablePath()));
+ base::FilePath chrome_exe(dir_app.Append(GetExecutablePath()));
ASSERT_TRUE(EvictFileFromSystemCacheWrapper(chrome_exe));
#if defined(OS_WIN)
// chrome.dll is windows specific.
- FilePath chrome_dll(dir_app.Append(FILE_PATH_LITERAL("chrome.dll")));
+ base::FilePath chrome_dll(
+ dir_app.Append(FILE_PATH_LITERAL("chrome.dll")));
ASSERT_TRUE(EvictFileFromSystemCacheWrapper(chrome_dll));
#endif
}
@@ -242,7 +243,7 @@ class StartupTest : public UIPerfTest {
clear_profile_ = false;
// Clear template_user_data_ so we don't try to copy it over each time
// through.
- set_template_user_data(FilePath());
+ set_template_user_data(base::FilePath());
}
}
@@ -294,7 +295,7 @@ class StartupTest : public UIPerfTest {
}
}
- FilePath profiling_file_;
+ base::FilePath profiling_file_;
bool collect_profiling_stats_;
};
diff --git a/chrome/test/perf/tab_switching_test.cc b/chrome/test/perf/tab_switching_test.cc
index e2ba2a4..9878622 100644
--- a/chrome/test/perf/tab_switching_test.cc
+++ b/chrome/test/perf/tab_switching_test.cc
@@ -157,7 +157,7 @@ class TabSwitchingUITest : public UIPerfTest {
"ml.wikipedia.org", "www.bbc.co.uk",
"126.com", "www.altavista.com"};
int number_of_new_tabs_opened = 0;
- FilePath file_name;
+ base::FilePath file_name;
for (size_t i = 0; i < arraysize(files); ++i) {
file_name = path_prefix_;
file_name = file_name.AppendASCII(files[i]);
@@ -172,8 +172,8 @@ class TabSwitchingUITest : public UIPerfTest {
return number_of_new_tabs_opened;
}
- FilePath path_prefix_;
- FilePath log_file_name_;
+ base::FilePath path_prefix_;
+ base::FilePath log_file_name_;
scoped_refptr<BrowserProxy> browser_proxy_;
private:
diff --git a/chrome/test/perf/url_fetch_test.cc b/chrome/test/perf/url_fetch_test.cc
index 11f0d9f..0b337c6 100644
--- a/chrome/test/perf/url_fetch_test.cc
+++ b/chrome/test/perf/url_fetch_test.cc
@@ -85,7 +85,7 @@ class UrlFetchTest : public UIPerfTest {
}
};
-bool WriteValueToFile(std::string value, const FilePath& path) {
+bool WriteValueToFile(std::string value, const base::FilePath& path) {
int retval = file_util::WriteFile(path, value.c_str(), value.length());
return retval == static_cast<int>(value.length());
}
@@ -166,14 +166,15 @@ TEST_F(UrlFetchTest, UrlFetch) {
&result);
// Write out the cookie if requested
- FilePath cookie_output_path =
+ base::FilePath cookie_output_path =
cmd_line->GetSwitchValuePath("wait_cookie_output");
if (!cookie_output_path.value().empty()) {
ASSERT_TRUE(WriteValueToFile(result.cookie_value, cookie_output_path));
}
// Write out the JS Variable if requested
- FilePath jsvar_output_path = cmd_line->GetSwitchValuePath("jsvar_output");
+ base::FilePath jsvar_output_path =
+ cmd_line->GetSwitchValuePath("jsvar_output");
if (!jsvar_output_path.value().empty()) {
ASSERT_TRUE(WriteValueToFile(result.javascript_variable,
jsvar_output_path));