summaryrefslogtreecommitdiffstats
path: root/chrome/test/startup/startup_test.cc
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-15 16:33:42 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-15 16:33:42 +0000
commit3e9996e8b7f2e53c71a205852feeb16012ad43e5 (patch)
treef774509571cc7f8beb28476ada1f3b763646d2c1 /chrome/test/startup/startup_test.cc
parent98a4a3ec81fc455480e745cb32e94fa2c4f904a6 (diff)
downloadchromium_src-3e9996e8b7f2e53c71a205852feeb16012ad43e5.zip
chromium_src-3e9996e8b7f2e53c71a205852feeb16012ad43e5.tar.gz
chromium_src-3e9996e8b7f2e53c71a205852feeb16012ad43e5.tar.bz2
Fix startup tests with complex theme.
BUG= http://crbug.com/18767 TEST= none Review URL: http://codereview.chromium.org/165478 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/startup/startup_test.cc')
-rw-r--r--chrome/test/startup/startup_test.cc28
1 files changed, 17 insertions, 11 deletions
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index 7a187de..59908a8 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -29,6 +29,15 @@ class StartupTest : public UITest {
void RunStartupTest(const char* graph, const char* trace,
bool test_cold, bool important, int profile_type) {
+ 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) {
+ set_template_user_data(UITest::ComputeTypicalUserDataSource(
+ profile_type).ToWStringHack());
+ }
+
const int kNumCyclesMax = 20;
int numCycles = kNumCyclesMax;
// It's ok for unit test code to use getenv(), isn't it?
@@ -64,13 +73,6 @@ class StartupTest : public UITest {
NOTIMPLEMENTED() << "gears not enabled yet";
#endif
}
-
- // Sets the profile data for the run. For now, this is only used for
- // the complex theme test.
- if (profile_type == UITest::COMPLEX_THEME)
- set_template_user_data(UITest::ComputeTypicalUserDataSource(
- profile_type).ToWStringHack());
-
UITest::SetUp();
TimeTicks end_time = TimeTicks::Now();
timings[i] = end_time - browser_launch_time_;
@@ -83,6 +85,10 @@ 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)
+ set_template_user_data(L"");
}
}
@@ -161,9 +167,9 @@ TEST_F(StartupFileTest, PerfColdGears) {
}
#endif
-//TEST_F(StartupTest, PerfColdComplexTheme) {
-// RunStartupTest("warm", "t-theme", false /* warm */,
-// false /* not important */, UITest::COMPLEX_THEME);
-//}
+TEST_F(StartupTest, PerfColdComplexTheme) {
+ RunStartupTest("warm", "t-theme", false /* warm */,
+ false /* not important */, UITest::COMPLEX_THEME);
+}
} // namespace