OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_PUBLIC_TEST_PPAPI_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_PPAPI_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_PPAPI_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_PPAPI_TEST_UTILS_H_ |
7 | 7 |
8 #include <string> | |
9 | |
10 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
11 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
12 | 10 |
13 namespace base { | 11 namespace base { |
14 class CommandLine; | 12 class CommandLine; |
15 } | 13 } |
16 | 14 |
17 // This file specifies utility functions used in Pepper testing in | 15 // This file specifies utility functions used in Pepper testing in |
18 // browser_tests and content_browsertests. | 16 // browser_tests and content_browsertests. |
19 namespace ppapi { | 17 namespace ppapi { |
20 | 18 |
21 // Strips prefixes used to annotate tests from a test name. | |
22 std::string StripTestPrefixes(const std::string& test_name); | |
23 | |
24 // Registers the PPAPI test plugin to application/x-ppapi-tests. Returns true | 19 // Registers the PPAPI test plugin to application/x-ppapi-tests. Returns true |
25 // on success, and false otherwise. | 20 // on success, and false otherwise. |
26 bool RegisterTestPlugin(base::CommandLine* command_line) WARN_UNUSED_RESULT; | 21 bool RegisterTestPlugin(base::CommandLine* command_line) WARN_UNUSED_RESULT; |
27 | 22 |
28 // Registers the PPAPI test plugin with some some extra parameters. Returns true | 23 // Registers the PPAPI test plugin with some some extra parameters. Returns true |
29 // on success and false otherwise. | 24 // on success and false otherwise. |
30 bool RegisterTestPluginWithExtraParameters( | 25 bool RegisterTestPluginWithExtraParameters( |
31 base::CommandLine* command_line, | 26 base::CommandLine* command_line, |
32 const base::FilePath::StringType& extra_registration_parameters) | 27 const base::FilePath::StringType& extra_registration_parameters) |
33 WARN_UNUSED_RESULT; | 28 WARN_UNUSED_RESULT; |
34 | 29 |
35 // Registers the Power Saver test plugin to application/x-ppapi-tests. | 30 // Registers the Power Saver test plugin to application/x-ppapi-tests. |
36 // Returns true on success, and false otherwise. | 31 // Returns true on success, and false otherwise. |
37 bool RegisterPowerSaverTestPlugin(base::CommandLine* command_line) | 32 bool RegisterPowerSaverTestPlugin(base::CommandLine* command_line) |
38 WARN_UNUSED_RESULT; | 33 WARN_UNUSED_RESULT; |
39 | 34 |
40 } // namespace ppapi | 35 } // namespace ppapi |
41 | 36 |
42 #endif // CONTENT_PUBLIC_TEST_PPAPI_TEST_UTILS_H_ | 37 #endif // CONTENT_PUBLIC_TEST_PPAPI_TEST_UTILS_H_ |
OLD | NEW |