summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/ui_test.cc19
-rw-r--r--chrome/test/ui/ui_test.h10
2 files changed, 29 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 25ec701..69de19a 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -963,3 +963,22 @@ bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) {
}
return false;
}
+
+// static
+FilePath UITest::ComputeTypicalUserDataSource(int profile_type) {
+ FilePath source_history_file;
+ EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA,
+ &source_history_file));
+ if (profile_type == UITest::DEFAULT_THEME) {
+ source_history_file = source_history_file.AppendASCII("profiles")
+ .AppendASCII("typical_history");
+ } else if (profile_type == UITest::COMPLEX_THEME) {
+ source_history_file = source_history_file.AppendASCII("profiles")
+ .AppendASCII("complex_theme");
+ } else {
+ NOTREACHED();
+ }
+ return source_history_file;
+}
+
+
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 1d4374d..a512fb7 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -338,6 +338,10 @@ class UITest : public testing::Test {
log_level_ = value;
}
+ // Returns the directory name where the "typical" user data is that we use
+ // for testing.
+ static FilePath ComputeTypicalUserDataSource(int profile_type);
+
// 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
@@ -404,6 +408,12 @@ class UITest : public testing::Test {
void StartHttpServer(const FilePath& root_directory);
void StopHttpServer();
+ // Profile theme type choices.
+ enum {
+ DEFAULT_THEME = 0,
+ COMPLEX_THEME = 1
+ } ProfileType;
+
private:
// Check that no processes related to Chrome exist, displaying
// the given message if any do.