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

Unified Diff: ui/views/test/run_all_perftests.cc

Issue 1231763002: Adds a perf test for initializing and painting a views::LabelButton Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: various tweaks Created 5 years, 5 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 | « ui/views/run_all_unittests.cc ('k') | ui/views/test/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/run_all_perftests.cc
diff --git a/ui/views/test/run_all_perftests.cc b/ui/views/test/run_all_perftests.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4efc48593998ad8b730cd267794190748efaaff9
--- /dev/null
+++ b/ui/views/test/run_all_perftests.cc
@@ -0,0 +1,36 @@
+// Copyright 2015 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.
+
+#include "base/bind.h"
+#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/perf_test_suite.h"
+#include "ui/views/test/views_test_suite.h"
+
+class ViewsPerfTestSuite : public base::PerfTestSuite {
+ public:
+ ViewsPerfTestSuite(int argc, char** argv) : base::PerfTestSuite(argc, argv) {}
+
+ protected:
+ void Initialize() override {
+ PerfTestSuite::Initialize();
+ test::InitializeViewsTestSuite();
+ }
+
+ void Shutdown() override {
+ test::ShutdownViewsTestSuite();
+ PerfTestSuite::Shutdown();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ViewsPerfTestSuite);
+};
+
+int main(int argc, char** argv) {
+ ViewsPerfTestSuite test_suite(argc, argv);
+
+ return base::LaunchUnitTestsSerially(
+ argc, argv,
+ base::Bind(&ViewsPerfTestSuite::Run,
+ base::Unretained(&test_suite)));
+}
« no previous file with comments | « ui/views/run_all_unittests.cc ('k') | ui/views/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698