| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef BASE_TEST_TEST_LAUNCHER_H_ | 5 #ifndef BASE_TEST_TEST_LAUNCHER_H_ |
| 6 #define BASE_TEST_TEST_LAUNCHER_H_ | 6 #define BASE_TEST_TEST_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 | 14 |
| 15 class CommandLine; |
| 16 |
| 15 namespace testing { | 17 namespace testing { |
| 16 class TestCase; | 18 class TestCase; |
| 17 class TestInfo; | 19 class TestInfo; |
| 18 } | 20 } |
| 19 | 21 |
| 20 namespace base { | 22 namespace base { |
| 21 | 23 |
| 22 // Constants for GTest command-line flags. | 24 // Constants for GTest command-line flags. |
| 23 extern const char kGTestFilterFlag[]; | 25 extern const char kGTestFilterFlag[]; |
| 24 extern const char kGTestListTestsFlag[]; | 26 extern const char kGTestListTestsFlag[]; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 65 |
| 64 // If the delegate is running tests asynchronously, it must finish | 66 // If the delegate is running tests asynchronously, it must finish |
| 65 // running all pending tests and call their callbacks before returning | 67 // running all pending tests and call their callbacks before returning |
| 66 // from this method. | 68 // from this method. |
| 67 virtual void RunRemainingTests() = 0; | 69 virtual void RunRemainingTests() = 0; |
| 68 | 70 |
| 69 protected: | 71 protected: |
| 70 virtual ~TestLauncherDelegate(); | 72 virtual ~TestLauncherDelegate(); |
| 71 }; | 73 }; |
| 72 | 74 |
| 75 int LaunchChildGTestProcess(const CommandLine& command_line, |
| 76 base::TimeDelta timeout, |
| 77 bool* was_timeout); |
| 78 |
| 73 // Launches GTest-based tests from the current executable | 79 // Launches GTest-based tests from the current executable |
| 74 // using |launcher_delegate|. | 80 // using |launcher_delegate|. |
| 75 int LaunchTests(TestLauncherDelegate* launcher_delegate, | 81 int LaunchTests(TestLauncherDelegate* launcher_delegate, |
| 76 int argc, | 82 int argc, |
| 77 char** argv) WARN_UNUSED_RESULT; | 83 char** argv) WARN_UNUSED_RESULT; |
| 78 | 84 |
| 79 } // namespace base | 85 } // namespace base |
| 80 | 86 |
| 81 #endif // BASE_TEST_TEST_LAUNCHER_H_ | 87 #endif // BASE_TEST_TEST_LAUNCHER_H_ |
| OLD | NEW |