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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/base/interactive_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/test/test_launcher.h" 5 #include "content/public/test/test_launcher.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 25
26 #if defined(OS_WIN) 26 #if defined(OS_WIN)
27 #include "content/public/app/startup_helper_win.h" 27 #include "content/public/app/startup_helper_win.h"
28 #include "sandbox/win/src/sandbox_types.h" 28 #include "sandbox/win/src/sandbox_types.h"
29 #endif // defined(OS_WIN) 29 #endif // defined(OS_WIN)
30 30
31 #if defined(TOOLKIT_VIEWS) 31 #if defined(TOOLKIT_VIEWS)
32 #include "ui/views/focus/accelerator_handler.h" 32 #include "ui/views/focus/accelerator_handler.h"
33 #endif 33 #endif
34 34
35 #if defined(USE_AURA)
36 #include "ui/aura/ui_controls_aura.h"
37 #include "ui/ui_controls/ui_controls.h"
38 #endif
39
35 const char kEmptyTestName[] = "InProcessBrowserTest.Empty"; 40 const char kEmptyTestName[] = "InProcessBrowserTest.Empty";
36 41
37 class ChromeTestLauncherDelegate : public content::TestLauncherDelegate { 42 class ChromeTestLauncherDelegate : public content::TestLauncherDelegate {
38 public: 43 public:
39 ChromeTestLauncherDelegate() {} 44 ChromeTestLauncherDelegate() {}
40 virtual ~ChromeTestLauncherDelegate() {} 45 virtual ~ChromeTestLauncherDelegate() {}
41 46
42 virtual std::string GetEmptyTestName() OVERRIDE { 47 virtual std::string GetEmptyTestName() OVERRIDE {
43 return kEmptyTestName; 48 return kEmptyTestName;
44 } 49 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 116
112 int main(int argc, char** argv) { 117 int main(int argc, char** argv) {
113 // http://crbug.com/163931 Disabled until browser_tests ready on Linux Aura. 118 // http://crbug.com/163931 Disabled until browser_tests ready on Linux Aura.
114 #if defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS) 119 #if defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS)
115 return 0; 120 return 0;
116 #endif 121 #endif
117 122
118 #if defined(OS_MACOSX) 123 #if defined(OS_MACOSX)
119 chrome_browser_application_mac::RegisterBrowserCrApp(); 124 chrome_browser_application_mac::RegisterBrowserCrApp();
120 #endif 125 #endif
126
127 // Only allow ui_controls to be used in interactive_ui_tests, since they depend
128 // on focus and can't be sharded.
129 #if defined(INTERACTIVE_TESTS)
130
131 #if defined(OS_CHROMEOS)
132 ui_controls::InstallUIControlsAura(ui_controls::CreateAshUIControls());
133 #elif defined(USE_AURA)
134 // TODO(win_ash): when running interactive_ui_tests for Win Ash, use above.
135 ui_controls::InstallUIControlsAura(aura::CreateUIControlsAura(NULL));
136 #endif
137
138 #endif
139
121 ChromeTestLauncherDelegate launcher_delegate; 140 ChromeTestLauncherDelegate launcher_delegate;
122 return content::LaunchTests(&launcher_delegate, argc, argv); 141 return content::LaunchTests(&launcher_delegate, argc, argv);
123 } 142 }
OLDNEW
« 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