summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-13 16:59:36 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-13 16:59:36 +0000
commit399c16fa178366fb55aa8e8b5acd313beede6a40 (patch)
tree432c97ca43278ffe67ab4b264eda98b9cae54bb9 /chrome/test/ui
parent574043bea0a1952fe90d1014eadaeb85976a1b05 (diff)
downloadchromium_src-399c16fa178366fb55aa8e8b5acd313beede6a40.zip
chromium_src-399c16fa178366fb55aa8e8b5acd313beede6a40.tar.gz
chromium_src-399c16fa178366fb55aa8e8b5acd313beede6a40.tar.bz2
Reverting 23313.
Review URL: http://codereview.chromium.org/165463 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/ui_test.cc38
-rw-r--r--chrome/test/ui/ui_test.h5
2 files changed, 1 insertions, 42 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index ccb0baf..69de19a 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -97,7 +97,6 @@ UITest::UITest()
include_testing_id_(true),
use_existing_browser_(default_use_existing_browser_),
enable_file_cookies_(true),
- profile_type_(UITest::DEFAULT_THEME),
test_start_time_(base::Time::NowFromSystemTime()),
command_execution_timeout_ms_(kMaxTestExecutionTime),
action_timeout_ms_(kWaitForActionMsec),
@@ -308,7 +307,7 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
chrome::kBrowserProcessExecutablePath));
CommandLine command_line(command.ToWStringHack());
- // Add any explicit command line flags passed to the process.
+ // Add any explict command line flags passed to the process.
std::wstring extra_chrome_flags =
CommandLine::ForCurrentProcess()->GetSwitchValue(kExtraChromeFlagsSwitch);
if (!extra_chrome_flags.empty()) {
@@ -424,11 +423,6 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
ASSERT_TRUE(file_util::CopyRecursiveDirNoCache(
template_user_data_,
user_data_dir_.ToWStringHack()));
- // 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) {
- RewritePreferencesFile(user_data_dir_);
- }
}
browser_launch_time_ = TimeTicks::Now();
@@ -971,36 +965,6 @@ bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) {
}
// static
-void UITest::RewritePreferencesFile(const FilePath& user_data_dir) {
- const FilePath pref_template_path(
- user_data_dir.AppendASCII("Default").AppendASCII("PreferencesTemplate"));
- const FilePath pref_path(
- user_data_dir.AppendASCII("Default").AppendASCII("Preferences"));
-
- // Read in preferences template.
- std::string pref_string;
- EXPECT_TRUE(file_util::ReadFileToString(pref_template_path, &pref_string));
- string16 format_string = ASCIIToUTF16(pref_string);
-
- // Make sure temp directory has the proper format for writing to prefs file.
- std::wstring user_data_dir_w(user_data_dir.value().c_str());
-#if defined(OS_WIN)
- // In Windows, the FilePath will write '\' for the path separators; change
- // these to a separator that won't trigger escapes.
- std::replace(user_data_dir_w.begin(),
- user_data_dir_w.end(), '\\', '/');
-#endif
-
- // Rewrite prefs file.
- std::vector<string16> subst;
- subst.push_back(user_data_dir_w);
- const std::string prefs_string =
- UTF16ToASCII(ReplaceStringPlaceholders(format_string, subst, NULL));
- EXPECT_TRUE(file_util::WriteFile(pref_path, prefs_string.c_str(),
- prefs_string.size()));
-}
-
-// static
FilePath UITest::ComputeTypicalUserDataSource(int profile_type) {
FilePath source_history_file;
EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA,
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 2b49f82..a512fb7 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -342,9 +342,6 @@ class UITest : public testing::Test {
// for testing.
static FilePath ComputeTypicalUserDataSource(int profile_type);
- // Rewrite the preferences file to point to the proper image directory.
- static void RewritePreferencesFile(const FilePath& user_data_dir);
-
// Called by some tests that wish to have a base profile to start from. This
// "user data directory" (containing one or more profiles) will be recursively
// copied into the user data directory for the test and the files will be
@@ -482,8 +479,6 @@ class UITest : public testing::Test {
bool use_existing_browser_; // Duplicate of the static version.
// Default value comes from static.
bool enable_file_cookies_; // Enable file cookies, default is true.
- int profile_type_; // Are we using a profile with a
- // complex theme?
private:
base::Time test_start_time_; // Time the test was started