Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: chrome/test/perf/startup_test.cc

Issue 14273023: Rebuild test history databases when starting up performance_ui_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT (and redo changes from TopSites to TopSitesImpl) Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/perf/startup_test.cc
diff --git a/chrome/test/perf/startup_test.cc b/chrome/test/perf/startup_test.cc
index 396d29a2cccb2398cc629bf4dae774aa687ef50c..000b7021287fe113b33ce1253cb4e97b16f99f5c 100644
--- a/chrome/test/perf/startup_test.cc
+++ b/chrome/test/perf/startup_test.cc
@@ -23,6 +23,7 @@
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/perf/perf_test.h"
+#include "chrome/test/perf/perf_ui_test_suite.h"
#include "chrome/test/ui/ui_perf_test.h"
#include "content/public/common/content_switches.h"
#include "net/base/net_util.h"
@@ -117,7 +118,7 @@ class StartupTest : public UIPerfTest {
// Rewrite the preferences file to point to the proper image directory.
virtual void SetUpProfile() OVERRIDE {
UIPerfTest::SetUpProfile();
- if (profile_type_ != UITestBase::COMPLEX_THEME)
+ if (profile_type_ != PerfUITestSuite::COMPLEX_THEME)
return;
const base::FilePath pref_template_path(user_data_dir().
@@ -162,16 +163,16 @@ class StartupTest : public UIPerfTest {
void RunStartupTest(const char* graph, const char* trace,
TestColdness test_cold, TestImportance test_importance,
- UITestBase::ProfileType profile_type,
+ PerfUITestSuite::ProfileType profile_type,
int num_tabs, int nth_timed_tab) {
bool important = (test_importance == IMPORTANT);
profile_type_ = profile_type;
// Sets the profile data for the run. For now, this is only used for
// the non-default themes test.
- if (profile_type != UITestBase::DEFAULT_THEME) {
- set_template_user_data(UITest::ComputeTypicalUserDataSource(
- profile_type));
+ if (profile_type != PerfUITestSuite::DEFAULT_THEME) {
+ set_template_user_data(
+ PerfUITestSuite::GetPathForProfileType(profile_type));
}
#if defined(NDEBUG)
@@ -323,26 +324,29 @@ class StartupTest : public UIPerfTest {
base::FilePath profiling_file_;
bool collect_profiling_stats_;
std::string trace_file_prefix_;
+
+ // Are we using a profile with a complex theme?
+ PerfUITestSuite::ProfileType profile_type_;
};
TEST_F(StartupTest, PerfWarm) {
SetUpWithCompositingDisabledOnMac();
RunStartupTest("warm", "t", WARM, IMPORTANT,
- UITestBase::DEFAULT_THEME, 0, 0);
+ PerfUITestSuite::DEFAULT_THEME, 0, 0);
}
#if defined(OS_MACOSX)
TEST_F(StartupTest, PerfWarmFCM) {
SetUpWithCompositingEnabledOnMac();
RunStartupTest("warm", "t_fcm", WARM, IMPORTANT,
- UITestBase::DEFAULT_THEME, 0, 0);
+ PerfUITestSuite::DEFAULT_THEME, 0, 0);
}
#endif
TEST_F(StartupTest, PerfReferenceWarm) {
UseReferenceBuild();
RunStartupTest("warm", "t_ref", WARM, IMPORTANT,
- UITestBase::DEFAULT_THEME, 0, 0);
+ PerfUITestSuite::DEFAULT_THEME, 0, 0);
}
// TODO(mpcomplete): Should we have reference timings for all these?
@@ -357,14 +361,14 @@ TEST_F(StartupTest, PerfReferenceWarm) {
TEST_F(StartupTest, MAYBE_PerfCold) {
SetUpWithCompositingDisabledOnMac();
RunStartupTest("cold", "t", COLD, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 0, 0);
+ PerfUITestSuite::DEFAULT_THEME, 0, 0);
}
#if defined(OS_MACOSX)
TEST_F(StartupTest, PerfColdFCM) {
SetUpWithCompositingEnabledOnMac();
RunStartupTest("cold", "t_fcm", COLD, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 0, 0);
+ PerfUITestSuite::DEFAULT_THEME, 0, 0);
}
#endif
@@ -401,7 +405,7 @@ void StartupTest::RunPerfTestWithManyTabs(const char* graph, const char* trace,
launch_arguments_ = new_launch_arguments;
}
RunStartupTest(graph, trace, WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, tab_count, nth_timed_tab);
+ PerfUITestSuite::DEFAULT_THEME, tab_count, nth_timed_tab);
}
// http://crbug.com/101591
@@ -501,7 +505,7 @@ TEST_F(StartupTest, PerfExtensionEmpty) {
SetUpWithFileURL();
SetUpWithExtensionsProfile("empty");
RunStartupTest("warm", "extension_empty", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
#if defined(OS_MACOSX)
@@ -510,7 +514,7 @@ TEST_F(StartupTest, PerfExtensionEmptyFCM) {
SetUpWithFileURL();
SetUpWithExtensionsProfile("empty");
RunStartupTest("warm", "extension_empty_fcm", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
#endif
@@ -519,7 +523,7 @@ TEST_F(StartupTest, PerfExtensionContentScript1) {
SetUpWithFileURL();
SetUpWithExtensionsProfile("content_scripts1");
RunStartupTest("warm", "extension_content_scripts1", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
#if defined(OS_MACOSX)
@@ -528,7 +532,7 @@ TEST_F(StartupTest, PerfExtensionContentScript1FCM) {
SetUpWithFileURL();
SetUpWithExtensionsProfile("content_scripts1");
RunStartupTest("warm", "extension_content_scripts1_fcm", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
#endif
@@ -536,12 +540,12 @@ TEST_F(StartupTest, MAYBE_PerfExtensionContentScript50) {
SetUpWithFileURL();
SetUpWithExtensionsProfile("content_scripts50");
RunStartupTest("warm", "extension_content_scripts50", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
TEST_F(StartupTest, MAYBE_PerfComplexTheme) {
RunStartupTest("warm", "t-theme", WARM, NOT_IMPORTANT,
- UITestBase::COMPLEX_THEME, 0, 0);
+ PerfUITestSuite::COMPLEX_THEME, 0, 0);
}
TEST_F(StartupTest, ProfilingScript1) {
@@ -549,7 +553,7 @@ TEST_F(StartupTest, ProfilingScript1) {
SetUpWithFileURL();
SetUpWithProfiling();
RunStartupTest("warm", "profiling_scripts1", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
#if defined(OS_MACOSX)
@@ -558,7 +562,7 @@ TEST_F(StartupTest, ProfilingScript1FCM) {
SetUpWithFileURL();
SetUpWithProfiling();
RunStartupTest("warm", "profiling_scripts1_fcm", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698