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

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

Issue 14585015: Recommit the generate profile patch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Load the browser dll manually on Windows. Created 7 years, 7 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
« no previous file with comments | « chrome/test/perf/run_all_perfuitests.cc ('k') | chrome/test/ui/ui_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/perf/startup_test.cc
diff --git a/chrome/test/perf/startup_test.cc b/chrome/test/perf/startup_test.cc
index f8ab9f88fb3a7cff0fe61617276b4ef48c8b3468..ea14b85712dadc168a478ac0042f271d73fc690c 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"
@@ -103,7 +104,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().
@@ -148,16 +149,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)
@@ -301,17 +302,20 @@ 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) {
RunStartupTest("warm", "t", WARM, IMPORTANT,
- UITestBase::DEFAULT_THEME, 0, 0);
+ PerfUITestSuite::DEFAULT_THEME, 0, 0);
}
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?
@@ -325,7 +329,7 @@ TEST_F(StartupTest, PerfReferenceWarm) {
TEST_F(StartupTest, MAYBE_PerfCold) {
RunStartupTest("cold", "t", COLD, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 0, 0);
+ PerfUITestSuite::DEFAULT_THEME, 0, 0);
}
void StartupTest::RunPerfTestWithManyTabs(const char* graph, const char* trace,
@@ -361,7 +365,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
@@ -444,33 +448,33 @@ TEST_F(StartupTest, PerfExtensionEmpty) {
SetUpWithFileURL();
SetUpWithExtensionsProfile("empty");
RunStartupTest("warm", "extension_empty", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
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);
}
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) {
SetUpWithFileURL();
SetUpWithProfiling();
RunStartupTest("warm", "profiling_scripts1", WARM, NOT_IMPORTANT,
- UITestBase::DEFAULT_THEME, 1, 0);
+ PerfUITestSuite::DEFAULT_THEME, 1, 0);
}
} // namespace
« no previous file with comments | « chrome/test/perf/run_all_perfuitests.cc ('k') | chrome/test/ui/ui_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698