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

Unified Diff: chrome/test/base/chrome_test_launcher.cc

Issue 11878013: Make ui_controls only usable from interactive_ui_tests. This has two benefits: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/chrome_tests.gypi ('k') | chrome/test/base/interactive_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/chrome_test_launcher.cc
===================================================================
--- chrome/test/base/chrome_test_launcher.cc (revision 176470)
+++ chrome/test/base/chrome_test_launcher.cc (working copy)
@@ -32,6 +32,11 @@
#include "ui/views/focus/accelerator_handler.h"
#endif
+#if defined(USE_AURA)
+#include "ui/aura/ui_controls_aura.h"
+#include "ui/ui_controls/ui_controls.h"
+#endif
+
const char kEmptyTestName[] = "InProcessBrowserTest.Empty";
class ChromeTestLauncherDelegate : public content::TestLauncherDelegate {
@@ -118,6 +123,20 @@
#if defined(OS_MACOSX)
chrome_browser_application_mac::RegisterBrowserCrApp();
#endif
+
+// Only allow ui_controls to be used in interactive_ui_tests, since they depend
+// on focus and can't be sharded.
+#if defined(INTERACTIVE_TESTS)
+
+#if defined(OS_CHROMEOS)
+ ui_controls::InstallUIControlsAura(ui_controls::CreateAshUIControls());
+#elif defined(USE_AURA)
+ // TODO(win_ash): when running interactive_ui_tests for Win Ash, use above.
+ ui_controls::InstallUIControlsAura(aura::CreateUIControlsAura(NULL));
+#endif
+
+#endif
+
ChromeTestLauncherDelegate launcher_delegate;
return content::LaunchTests(&launcher_delegate, argc, argv);
}
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/base/interactive_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698