diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 17:57:25 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 17:57:25 +0000 |
commit | d2ee25b6cb2cd1dd4267eb2a8972ef4a951caa29 (patch) | |
tree | b5288c14e50d57cd000c73974339d28a42958c5b /chrome/test/startup/startup_test.cc | |
parent | 619502c167f4f5ca4d5205f7a0de87a7ee2d1caf (diff) | |
download | chromium_src-d2ee25b6cb2cd1dd4267eb2a8972ef4a951caa29.zip chromium_src-d2ee25b6cb2cd1dd4267eb2a8972ef4a951caa29.tar.gz chromium_src-d2ee25b6cb2cd1dd4267eb2a8972ef4a951caa29.tar.bz2 |
Test startup of new tab page with a complex theme.
BUG= http://crbug.com/18767
TEST= none
Review URL: http://codereview.chromium.org/165168
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/startup/startup_test.cc')
-rw-r--r-- | chrome/test/startup/startup_test.cc | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc index 9244932..6c21f82 100644 --- a/chrome/test/startup/startup_test.cc +++ b/chrome/test/startup/startup_test.cc @@ -28,7 +28,7 @@ class StartupTest : public UITest { void TearDown() {} void RunStartupTest(const char* graph, const char* trace, - bool test_cold, bool important) { + bool test_cold, bool important, int profile_type) { const int kNumCyclesMax = 20; int numCycles = kNumCyclesMax; // It's ok for unit test code to use getenv(), isn't it? @@ -65,6 +65,12 @@ class StartupTest : public UITest { #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_; @@ -125,32 +131,39 @@ class StartupFileTest : public StartupTest { }; TEST_F(StartupTest, Perf) { - RunStartupTest("warm", "t", false /* not cold */, true /* important */); + RunStartupTest("warm", "t", false /* not cold */, true /* important */, + UITest::DEFAULT_THEME); } // TODO(port): We need a mac reference build checked in for this. TEST_F(StartupReferenceTest, Perf) { RunStartupTest("warm", "t_ref", false /* not cold */, - true /* important */); + true /* important */, UITest::DEFAULT_THEME); } // TODO(mpcomplete): Should we have reference timings for all these? TEST_F(StartupTest, PerfCold) { - RunStartupTest("cold", "t", true /* cold */, false /* not important */); + RunStartupTest("cold", "t", true /* cold */, false /* not important */, + UITest::DEFAULT_THEME); } #if defined(OS_WIN) // TODO(port): Enable gears tests on linux/mac once gears is working. TEST_F(StartupFileTest, PerfGears) { RunStartupTest("warm", "gears", false /* not cold */, - false /* not important */); + false /* not important */, UITest::DEFAULT_THEME); } TEST_F(StartupFileTest, PerfColdGears) { RunStartupTest("cold", "gears", true /* cold */, - false /* not important */); + false /* not important */, UITest::DEFAULT_THEME); } #endif +TEST_F(StartupTest, PerfColdComplexTheme) { + RunStartupTest("warm", "t-theme", false /* warm */, + false /* not important */, UITest::COMPLEX_THEME); +} + } // namespace |