OLD | NEW |
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/file_path.h" |
| 11 #include "base/file_util.h" |
10 #include "base/logging.h" | 12 #include "base/logging.h" |
11 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
| 14 #include "base/process_util.h" |
12 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
13 #include "base/string_util.h" | 16 #include "base/string_util.h" |
14 #include "base/test/test_file_util.h" | 17 #include "base/test/test_file_util.h" |
15 #include "chrome/app/chrome_main_delegate.h" | 18 #include "chrome/app/chrome_main_delegate.h" |
16 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/chrome_constants.h" | 20 #include "chrome/common/chrome_constants.h" |
| 21 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/test/base/chrome_test_suite.h" | 22 #include "chrome/test/base/chrome_test_suite.h" |
19 #include "content/public/app/content_main.h" | 23 #include "content/public/app/content_main.h" |
20 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
21 | 25 |
22 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
23 #include "chrome/browser/chrome_browser_application_mac.h" | 27 #include "chrome/browser/chrome_browser_application_mac.h" |
24 #endif // defined(OS_MACOSX) | 28 #endif // defined(OS_MACOSX) |
25 | 29 |
26 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
27 #include "content/public/app/startup_helper_win.h" | 31 #include "content/public/app/startup_helper_win.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 112 |
109 private: | 113 private: |
110 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) | 114 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) |
111 std::stack<linked_ptr<views::AcceleratorHandler> > handlers_; | 115 std::stack<linked_ptr<views::AcceleratorHandler> > handlers_; |
112 #endif | 116 #endif |
113 | 117 |
114 DISALLOW_COPY_AND_ASSIGN(ChromeTestLauncherDelegate); | 118 DISALLOW_COPY_AND_ASSIGN(ChromeTestLauncherDelegate); |
115 }; | 119 }; |
116 | 120 |
117 int main(int argc, char** argv) { | 121 int main(int argc, char** argv) { |
118 // http://crbug.com/163931 Disabled until browser_tests ready on Linux Aura. | 122 // http://crbug.com/163931 Disabled until interactive_ui_tests ready on Linux |
| 123 // Aura. |
119 #if defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS) | 124 #if defined(OS_LINUX) && defined(USE_AURA) && !defined(OS_CHROMEOS) |
120 return 0; | 125 base::FilePath bin_dir; |
| 126 CHECK(file_util::ReadSymbolicLink( |
| 127 base::FilePath(base::kProcSelfExe), &bin_dir)); |
| 128 std::string filename = bin_dir.value(); |
| 129 // http://crbug.com/154081: early exit until interactive_ui_tests are green. |
| 130 if (EndsWith(filename, "interactive_ui_tests", false)) { |
| 131 LOG(INFO) << "interactive_ui_tests on Linux Aura are not ready yet."; |
| 132 return 0; |
| 133 } |
121 #endif | 134 #endif |
122 | 135 |
123 #if defined(OS_MACOSX) | 136 #if defined(OS_MACOSX) |
124 chrome_browser_application_mac::RegisterBrowserCrApp(); | 137 chrome_browser_application_mac::RegisterBrowserCrApp(); |
125 #endif | 138 #endif |
126 | 139 |
127 // Only allow ui_controls to be used in interactive_ui_tests, since they depend | 140 // Only allow ui_controls to be used in interactive_ui_tests, since they depend |
128 // on focus and can't be sharded. | 141 // on focus and can't be sharded. |
129 #if defined(INTERACTIVE_TESTS) | 142 #if defined(INTERACTIVE_TESTS) |
130 | 143 |
131 #if defined(OS_CHROMEOS) | 144 #if defined(OS_CHROMEOS) |
132 ui_controls::InstallUIControlsAura(ui_controls::CreateAshUIControls()); | 145 ui_controls::InstallUIControlsAura(ui_controls::CreateAshUIControls()); |
133 #elif defined(USE_AURA) | 146 #elif defined(USE_AURA) |
134 // TODO(win_ash): when running interactive_ui_tests for Win Ash, use above. | 147 // TODO(win_ash): when running interactive_ui_tests for Win Ash, use above. |
135 ui_controls::InstallUIControlsAura(ui_controls::CreateUIControlsAura(NULL)); | 148 ui_controls::InstallUIControlsAura(ui_controls::CreateUIControlsAura(NULL)); |
136 #endif | 149 #endif |
137 | 150 |
138 #endif | 151 #endif |
139 | 152 |
140 ChromeTestLauncherDelegate launcher_delegate; | 153 ChromeTestLauncherDelegate launcher_delegate; |
141 return content::LaunchTests(&launcher_delegate, argc, argv); | 154 return content::LaunchTests(&launcher_delegate, argc, argv); |
142 } | 155 } |
OLD | NEW |