Index: chrome/test/base/performance_interactive_ui_tests_main.cc |
diff --git a/chrome/test/base/interactive_ui_tests_main.cc b/chrome/test/base/performance_interactive_ui_tests_main.cc |
similarity index 51% |
copy from chrome/test/base/interactive_ui_tests_main.cc |
copy to chrome/test/base/performance_interactive_ui_tests_main.cc |
index b9af4fe9399e06af3f9cdd5432797e695d386c95..9ede509c1febbb17a804bba2c23f62e1ef03a5d7 100644 |
--- a/chrome/test/base/interactive_ui_tests_main.cc |
+++ b/chrome/test/base/performance_interactive_ui_tests_main.cc |
@@ -1,47 +1,45 @@ |
-// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Copyright 2016 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 "chrome/test/base/chrome_test_launcher.h" |
+#include <memory> |
-#include "build/build_config.h" |
+#include "base/command_line.h" |
+#include "base/logging.h" |
+#include "chrome/common/chrome_switches.h" |
+#include "chrome/test/base/chrome_test_launcher.h" |
#include "chrome/test/base/chrome_test_suite.h" |
#include "ui/base/test/ui_controls.h" |
+#include "ui/compositor/compositor_switches.h" |
#if defined(USE_AURA) |
#include "ui/aura/test/ui_controls_factory_aura.h" |
#include "ui/base/test/ui_controls_aura.h" |
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
+#if defined(OS_LINUX) |
#include "ui/views/test/ui_controls_factory_desktop_aurax11.h" |
#endif |
#endif |
-#if defined(OS_CHROMEOS) |
-#include "ash/test/ui_controls_factory_ash.h" |
-#endif |
- |
#if defined(OS_WIN) |
#include "base/win/scoped_com_initializer.h" |
-#include "chrome/test/base/always_on_top_window_killer_win.h" |
#endif |
-class InteractiveUITestSuite : public ChromeTestSuite { |
+class PerformanceInteractiveUITestSuite : public ChromeTestSuite { |
public: |
- InteractiveUITestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} |
- ~InteractiveUITestSuite() override {} |
+ PerformanceInteractiveUITestSuite(int argc, char** argv) |
+ : ChromeTestSuite(argc, argv) {} |
+ ~PerformanceInteractiveUITestSuite() override {} |
protected: |
// ChromeTestSuite overrides: |
void Initialize() override { |
ChromeTestSuite::Initialize(); |
- // Only allow ui_controls to be used in interactive_ui_tests, since they |
- // depend on focus and can't be sharded. |
+ // Only allow ui_controls to be used in performance_interactive_ui_tests, |
+ // since they depend on focus and can't be sharded. |
ui_controls::EnableUIControls(); |
-#if defined(OS_CHROMEOS) |
- ui_controls::InstallUIControlsAura(ash::test::CreateAshUIControls()); |
-#elif defined(USE_AURA) |
+#if defined(USE_AURA) |
#if defined(OS_WIN) |
com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
#endif |
@@ -50,10 +48,15 @@ class InteractiveUITestSuite : public ChromeTestSuite { |
ui_controls::InstallUIControlsAura( |
views::test::CreateUIControlsDesktopAura()); |
#else |
- // TODO(win_ash): when running interactive_ui_tests for Win Ash, use above. |
+ // TODO(win_ash): when running performance_interactive_ui_tests |
+ // for Win Ash, use above. |
ui_controls::InstallUIControlsAura(aura::test::CreateUIControlsAura(NULL)); |
#endif |
#endif |
+ base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
+ DCHECK(cmd); |
+ // Enable pixel output for performance tests. |
+ cmd->AppendSwitch(switches::kEnablePixelOutputInTests); |
} |
void Shutdown() override { |
@@ -68,24 +71,18 @@ class InteractiveUITestSuite : public ChromeTestSuite { |
#endif |
}; |
-class InteractiveUITestSuiteRunner : public ChromeTestSuiteRunner { |
+class PerformanceInteractiveUITestSuiteRunner : public ChromeTestSuiteRunner { |
public: |
int RunTestSuite(int argc, char** argv) override { |
- return InteractiveUITestSuite(argc, argv).Run(); |
+ return PerformanceInteractiveUITestSuite(argc, argv).Run(); |
} |
}; |
int main(int argc, char** argv) { |
-#if defined(OS_WIN) |
- KillAlwaysOnTopWindows(RunType::BEFORE_TEST); |
-#endif |
- // Run interactive_ui_tests serially, they do not support running in parallel. |
+ // Run performance_interactive_ui_tests serially, |
+ // they do not support running in parallel. |
int default_jobs = 1; |
- InteractiveUITestSuiteRunner runner; |
+ PerformanceInteractiveUITestSuiteRunner runner; |
ChromeTestLauncherDelegate delegate(&runner); |
- const int result = LaunchChromeTests(default_jobs, &delegate, argc, argv); |
-#if defined(OS_WIN) |
- KillAlwaysOnTopWindows(RunType::AFTER_TEST); |
-#endif |
- return result; |
+ return LaunchChromeTests(default_jobs, &delegate, argc, argv); |
} |