summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 21:11:20 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 21:11:20 +0000
commit62ac1f97b9eebdf5e993cd5c65c05302c3ff96df (patch)
tree04a072930bcd2a45836c029b3836d3cb1e82b992 /chrome
parent1a89ea1ad2d890cf196eee4c24a8dec9fa573961 (diff)
downloadchromium_src-62ac1f97b9eebdf5e993cd5c65c05302c3ff96df.zip
chromium_src-62ac1f97b9eebdf5e993cd5c65c05302c3ff96df.tar.gz
chromium_src-62ac1f97b9eebdf5e993cd5c65c05302c3ff96df.tar.bz2
GTK Theme: Add startup tests for gtk themes.
http://crbug.com/19376 Review URL: http://codereview.chromium.org/173010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/data/profiles/gtk_theme/Default/Cookiesbin0 -> 6144 bytes
-rw-r--r--chrome/test/data/profiles/gtk_theme/Default/Full Text Indexbin0 -> 20480 bytes
-rw-r--r--chrome/test/data/profiles/gtk_theme/Default/Historybin0 -> 13770752 bytes
-rw-r--r--chrome/test/data/profiles/gtk_theme/Default/Preferences16
-rw-r--r--chrome/test/data/profiles/gtk_theme/Default/Thumbnailsbin0 -> 32768 bytes
-rw-r--r--chrome/test/data/profiles/gtk_theme/Default/Visited Linksbin0 -> 131072 bytes
-rw-r--r--chrome/test/startup/feature_startup_test.cc8
-rw-r--r--chrome/test/startup/startup_test.cc17
-rw-r--r--chrome/test/ui/ui_test.cc3
-rw-r--r--chrome/test/ui/ui_test.h3
10 files changed, 41 insertions, 6 deletions
diff --git a/chrome/test/data/profiles/gtk_theme/Default/Cookies b/chrome/test/data/profiles/gtk_theme/Default/Cookies
new file mode 100644
index 0000000..e138f7c
--- /dev/null
+++ b/chrome/test/data/profiles/gtk_theme/Default/Cookies
Binary files differ
diff --git a/chrome/test/data/profiles/gtk_theme/Default/Full Text Index b/chrome/test/data/profiles/gtk_theme/Default/Full Text Index
new file mode 100644
index 0000000..65ea2f6
--- /dev/null
+++ b/chrome/test/data/profiles/gtk_theme/Default/Full Text Index
Binary files differ
diff --git a/chrome/test/data/profiles/gtk_theme/Default/History b/chrome/test/data/profiles/gtk_theme/Default/History
new file mode 100644
index 0000000..b3d68c7
--- /dev/null
+++ b/chrome/test/data/profiles/gtk_theme/Default/History
Binary files differ
diff --git a/chrome/test/data/profiles/gtk_theme/Default/Preferences b/chrome/test/data/profiles/gtk_theme/Default/Preferences
new file mode 100644
index 0000000..e2e79aa
--- /dev/null
+++ b/chrome/test/data/profiles/gtk_theme/Default/Preferences
@@ -0,0 +1,16 @@
+{
+ "extensions": {
+ "theme": {
+ "use_system": true
+ }
+ },
+ "profile": {
+ "exited_cleanly": true,
+ "id": "not-signed-in",
+ "name": "Not Signed In",
+ "nickname": "not-signed-in"
+ },
+ "spellcheck": {
+ "dictionary": "en-US"
+ }
+}
diff --git a/chrome/test/data/profiles/gtk_theme/Default/Thumbnails b/chrome/test/data/profiles/gtk_theme/Default/Thumbnails
new file mode 100644
index 0000000..fc26118
--- /dev/null
+++ b/chrome/test/data/profiles/gtk_theme/Default/Thumbnails
Binary files differ
diff --git a/chrome/test/data/profiles/gtk_theme/Default/Visited Links b/chrome/test/data/profiles/gtk_theme/Default/Visited Links
new file mode 100644
index 0000000..2fa35a9
--- /dev/null
+++ b/chrome/test/data/profiles/gtk_theme/Default/Visited Links
Binary files differ
diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc
index 7efe921..e253817 100644
--- a/chrome/test/startup/feature_startup_test.cc
+++ b/chrome/test/startup/feature_startup_test.cc
@@ -114,4 +114,12 @@ TEST_F(NewTabUIStartupTest, ComplexThemeCold) {
UITest::COMPLEX_THEME);
}
+#if defined(OS_LINUX)
+TEST_F(NewTabUIStartupTest, GtkThemeCold) {
+ RunStartupTest("tab_gtk_theme_cold", false /* cold */,
+ false /* not important */,
+ UITest::NATIVE_THEME);
+}
+#endif
+
} // namespace
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index 59908a8..fe71293 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -32,8 +32,8 @@ class StartupTest : public UITest {
profile_type_ = profile_type;
// Sets the profile data for the run. For now, this is only used for
- // the complex theme test.
- if (profile_type == UITest::COMPLEX_THEME) {
+ // the non-default themes test.
+ if (profile_type != UITest::DEFAULT_THEME) {
set_template_user_data(UITest::ComputeTypicalUserDataSource(
profile_type).ToWStringHack());
}
@@ -85,9 +85,9 @@ class StartupTest : public UITest {
// Re-use the profile data after first run so that the noise from
// creating databases doesn't impact all the runs.
clear_profile_ = false;
- // Destroy template_user_data_ for complex theme so we don't try to
- // rewrite each time through.
- if (profile_type == UITest::COMPLEX_THEME)
+ // Destroy template_user_data_ for complex/gtk themes so we don't try
+ // to rewrite each time through.
+ if (profile_type != UITest::DEFAULT_THEME)
set_template_user_data(L"");
}
}
@@ -172,4 +172,11 @@ TEST_F(StartupTest, PerfColdComplexTheme) {
false /* not important */, UITest::COMPLEX_THEME);
}
+#if defined(OS_LINUX)
+TEST_F(StartupTest, PerfColdGtkTheme) {
+ RunStartupTest("warm", "gtk-theme", false /* warm */,
+ false /* not important */, UITest::NATIVE_THEME);
+}
+#endif
+
} // namespace
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index cc768e9..ec08b65 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -1013,6 +1013,9 @@ FilePath UITest::ComputeTypicalUserDataSource(int profile_type) {
} else if (profile_type == UITest::COMPLEX_THEME) {
source_history_file = source_history_file.AppendASCII("profiles")
.AppendASCII("complex_theme");
+ } else if (profile_type == UITest::NATIVE_THEME) {
+ source_history_file = source_history_file.AppendASCII("profiles")
+ .AppendASCII("gtk_theme");
} else {
NOTREACHED();
}
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 2b49f82..50afc27 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -414,7 +414,8 @@ class UITest : public testing::Test {
// Profile theme type choices.
enum {
DEFAULT_THEME = 0,
- COMPLEX_THEME = 1
+ COMPLEX_THEME = 1,
+ NATIVE_THEME = 2
} ProfileType;
private: