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

Unified Diff: chrome/test/perf/perf_ui_test_suite.h

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/perf_ui_test_suite.h
diff --git a/chrome/test/perf/perf_ui_test_suite.h b/chrome/test/perf/perf_ui_test_suite.h
new file mode 100644
index 0000000000000000000000000000000000000000..a84adcce04107284251573a6c69d29168045626a
--- /dev/null
+++ b/chrome/test/perf/perf_ui_test_suite.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_TEST_PERF_PERF_UI_TEST_SUITE_H_
+#define CHROME_TEST_PERF_PERF_UI_TEST_SUITE_H_
+
+#include "base/files/scoped_temp_dir.h"
+#include "chrome/test/ui/ui_test_suite.h"
+
+namespace base {
+class FilePath;
+}
+
+// UITestSuite which creates two testing profiles at Initialize() time. We
+// create fake profiles so we don't commit 10-20 megabytes of binary data to
+// the repository each time we change the history format (or even worse, don't
+// update the test profiles and have incorrect performance data!)
+class PerfUITestSuite : public UITestSuite {
+ public:
+ PerfUITestSuite(int argc, char** argv);
+ virtual ~PerfUITestSuite();
+
+ // Profile theme type choices.
+ enum ProfileType {
+ DEFAULT_THEME = 0,
+ COMPLEX_THEME = 1,
+ };
+
+ // Returns the directory name where the "typical" user data is that we use
+ // for testing.
+ static base::FilePath GetPathForProfileType(ProfileType profile_type);
+
+ // Overridden from UITestSuite:
+ virtual void Initialize() OVERRIDE;
+
+ private:
+ // Builds a "Cached Theme.pak" file in |extension_base|.
+ void BuildCachedThemePakIn(const base::FilePath& extension_base);
+
+ // We need to expand a template Preferences files so that we point to the
+ // "Cached Theme.pak" we did in BuildCachedThemePakIn().
+ void ExpandTemplate(const base::FilePath& base_data_dir,
+ const base::FilePath& complex_profile_default_dir);
+
+ base::ScopedTempDir default_profile_dir_;
+ base::ScopedTempDir complex_profile_dir_;
+};
+
+#endif // CHROME_TEST_PERF_PERF_UI_TEST_SUITE_H_

Powered by Google App Engine
This is Rietveld 408576698