summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 23:57:27 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-12 23:57:27 +0000
commit19eef14a9c8d939a82fa262633927968a33daf6e (patch)
treeb5f5c188f49911cddf39a3edb8f18daaa76d5c88 /chrome
parent2f7f4d591192cfdebee227b72e3cf57c7c604450 (diff)
downloadchromium_src-19eef14a9c8d939a82fa262633927968a33daf6e.zip
chromium_src-19eef14a9c8d939a82fa262633927968a33daf6e.tar.gz
chromium_src-19eef14a9c8d939a82fa262633927968a33daf6e.tar.bz2
Convert a CopyRecursiveDirNoCache to use FilePaths instead
of wstrings. Also convert template_user_data_ in UITest to be a FilePath. Review URL: http://codereview.chromium.org/273021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/page_cycler/page_cycler_test.cc2
-rw-r--r--chrome/test/startup/feature_startup_test.cc2
-rw-r--r--chrome/test/startup/startup_test.cc6
-rw-r--r--chrome/test/ui/ui_test.cc2
-rw-r--r--chrome/test/ui/ui_test.h6
5 files changed, 9 insertions, 9 deletions
diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc
index 033cd09..7c611d5 100644
--- a/chrome/test/page_cycler/page_cycler_test.cc
+++ b/chrome/test/page_cycler/page_cycler_test.cc
@@ -449,7 +449,7 @@ class PageCyclerExtensionTest : public PageCyclerTest {
data_dir = data_dir.AppendASCII("extensions").AppendASCII("profiles").
AppendASCII(extension_profile);
ASSERT_TRUE(file_util::DirectoryExists(data_dir));
- set_template_user_data(data_dir.ToWStringHack());
+ set_template_user_data(data_dir);
// Now run the test.
PageCyclerTest::SetUp();
diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc
index d112295..31fd81a 100644
--- a/chrome/test/startup/feature_startup_test.cc
+++ b/chrome/test/startup/feature_startup_test.cc
@@ -44,7 +44,7 @@ class NewTabUIStartupTest : public UITest {
// Install the location of the test profile file.
set_template_user_data(UITest::ComputeTypicalUserDataSource(
- profile_type).ToWStringHack());
+ profile_type));
// Disable the first run notification because it has an animation which
// masks any real performance regressions.
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index ec874f2..385b592 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -46,7 +46,7 @@ class StartupTest : public UITest {
PathService::Get(chrome::DIR_TEST_DATA, &data_dir);
data_dir = data_dir.AppendASCII("extensions").AppendASCII("profiles").
AppendASCII(profile);
- set_template_user_data(data_dir.ToWStringHack());
+ set_template_user_data(data_dir);
}
void RunStartupTest(const char* graph, const char* trace,
@@ -57,7 +57,7 @@ class StartupTest : public UITest {
// the non-default themes test.
if (profile_type != UITest::DEFAULT_THEME) {
set_template_user_data(UITest::ComputeTypicalUserDataSource(
- profile_type).ToWStringHack());
+ profile_type));
}
const int kNumCyclesMax = 20;
@@ -109,7 +109,7 @@ class StartupTest : public UITest {
clear_profile_ = false;
// Clear template_user_data_ so we don't try to copy it over each time
// through.
- set_template_user_data(L"");
+ set_template_user_data(FilePath());
}
}
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 8ff8f64..cf49227 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -357,7 +357,7 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
// Recursively copy the template directory to the user_data_dir.
ASSERT_TRUE(file_util::CopyRecursiveDirNoCache(
template_user_data_,
- user_data_dir_.ToWStringHack()));
+ user_data_dir_));
// If we're using the complex theme data, we need to write the
// user_data_dir_ to our preferences file.
if (profile_type_ == UITest::COMPLEX_THEME) {
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index c87ffe1..4112549a 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -383,8 +383,8 @@ class UITest : public testing::Test {
// copied into the user data directory for the test and the files will be
// evicted from the OS cache. To start with a blank profile, supply an empty
// string (the default).
- std::wstring template_user_data() const { return template_user_data_; }
- void set_template_user_data(const std::wstring& template_user_data) {
+ const FilePath& template_user_data() const { return template_user_data_; }
+ void set_template_user_data(const FilePath& template_user_data) {
template_user_data_ = template_user_data;
}
@@ -503,7 +503,7 @@ class UITest : public testing::Test {
base::TimeTicks browser_launch_time_; // Time when the browser was run.
bool dom_automation_enabled_; // This can be set to true to have the
// test run the dom automation case.
- std::wstring template_user_data_; // See set_template_user_data().
+ FilePath template_user_data_; // See set_template_user_data().
base::ProcessHandle process_; // Handle to the first Chrome process.
base::ProcessId process_id_; // PID of |process_| (for debugging).
FilePath user_data_dir_; // User data directory used for the test