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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 void WrapperTestLauncherDelegate::RunRemainingTests() { | 262 void WrapperTestLauncherDelegate::RunRemainingTests() { |
263 // No need to do anything else here, we launch tests synchronously. | 263 // No need to do anything else here, we launch tests synchronously. |
264 } | 264 } |
265 | 265 |
266 } // namespace | 266 } // namespace |
267 | 267 |
268 // The following is kept for historical reasons (so people that are used to | 268 // The following is kept for historical reasons (so people that are used to |
269 // using it don't get surprised). | 269 // using it don't get surprised). |
270 const char kChildProcessFlag[] = "child"; | 270 const char kChildProcessFlag[] = "child"; |
271 | 271 |
272 const char kGTestHelpFlag[] = "gtest_help"; | |
273 | |
274 const char kHelpFlag[] = "help"; | 272 const char kHelpFlag[] = "help"; |
275 | 273 |
276 const char kLaunchAsBrowser[] = "as-browser"; | 274 const char kLaunchAsBrowser[] = "as-browser"; |
277 | 275 |
278 // See kManualTestPrefix above. | 276 // See kManualTestPrefix above. |
279 const char kRunManualTestsFlag[] = "run-manual"; | 277 const char kRunManualTestsFlag[] = "run-manual"; |
280 | 278 |
281 const char kSingleProcessTestsFlag[] = "single_process"; | 279 const char kSingleProcessTestsFlag[] = "single_process"; |
282 | 280 |
283 | 281 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 323 |
326 if (command_line->HasSwitch(kHelpFlag)) { | 324 if (command_line->HasSwitch(kHelpFlag)) { |
327 PrintUsage(); | 325 PrintUsage(); |
328 return 0; | 326 return 0; |
329 } | 327 } |
330 | 328 |
331 if (command_line->HasSwitch(kSingleProcessTestsFlag) || | 329 if (command_line->HasSwitch(kSingleProcessTestsFlag) || |
332 (command_line->HasSwitch(switches::kSingleProcess) && | 330 (command_line->HasSwitch(switches::kSingleProcess) && |
333 command_line->HasSwitch(base::kGTestFilterFlag)) || | 331 command_line->HasSwitch(base::kGTestFilterFlag)) || |
334 command_line->HasSwitch(base::kGTestListTestsFlag) || | 332 command_line->HasSwitch(base::kGTestListTestsFlag) || |
335 command_line->HasSwitch(kGTestHelpFlag)) { | 333 command_line->HasSwitch(base::kGTestHelpFlag)) { |
336 #if defined(OS_WIN) | 334 #if defined(OS_WIN) |
337 if (command_line->HasSwitch(kSingleProcessTestsFlag)) { | 335 if (command_line->HasSwitch(kSingleProcessTestsFlag)) { |
338 sandbox::SandboxInterfaceInfo sandbox_info; | 336 sandbox::SandboxInterfaceInfo sandbox_info; |
339 InitializeSandboxInfo(&sandbox_info); | 337 InitializeSandboxInfo(&sandbox_info); |
340 InitializeSandbox(&sandbox_info); | 338 InitializeSandbox(&sandbox_info); |
341 } | 339 } |
342 #endif | 340 #endif |
343 return launcher_delegate->RunTestSuite(argc, argv); | 341 return launcher_delegate->RunTestSuite(argc, argv); |
344 } | 342 } |
345 | 343 |
(...skipping 17 matching lines...) Expand all Loading... |
363 | 361 |
364 WrapperTestLauncherDelegate delegate(launcher_delegate); | 362 WrapperTestLauncherDelegate delegate(launcher_delegate); |
365 return base::LaunchTests(&delegate, argc, argv); | 363 return base::LaunchTests(&delegate, argc, argv); |
366 } | 364 } |
367 | 365 |
368 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { | 366 TestLauncherDelegate* GetCurrentTestLauncherDelegate() { |
369 return g_launcher_delegate; | 367 return g_launcher_delegate; |
370 } | 368 } |
371 | 369 |
372 } // namespace content | 370 } // namespace content |
OLD | NEW |