| 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 #ifndef SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ | 5 #ifndef SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ |
| 6 #define SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ | 6 #define SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 enum SboxTestResult { | 24 enum SboxTestResult { |
| 25 SBOX_TEST_FIRST_RESULT = CUSTOMER_CODE | SBOX_TESTS_FACILITY, | 25 SBOX_TEST_FIRST_RESULT = CUSTOMER_CODE | SBOX_TESTS_FACILITY, |
| 26 SBOX_TEST_SUCCEEDED, | 26 SBOX_TEST_SUCCEEDED, |
| 27 SBOX_TEST_PING_OK, | 27 SBOX_TEST_PING_OK, |
| 28 SBOX_TEST_FIRST_INFO = SBOX_TEST_FIRST_RESULT | SEVERITY_INFO_FLAGS, | 28 SBOX_TEST_FIRST_INFO = SBOX_TEST_FIRST_RESULT | SEVERITY_INFO_FLAGS, |
| 29 SBOX_TEST_DENIED, // Access was denied. | 29 SBOX_TEST_DENIED, // Access was denied. |
| 30 SBOX_TEST_NOT_FOUND, // The resource was not found. | 30 SBOX_TEST_NOT_FOUND, // The resource was not found. |
| 31 SBOX_TEST_FIRST_ERROR = SBOX_TEST_FIRST_RESULT | SEVERITY_ERROR_FLAGS, | 31 SBOX_TEST_FIRST_ERROR = SBOX_TEST_FIRST_RESULT | SEVERITY_ERROR_FLAGS, |
| 32 SBOX_TEST_SECOND_ERROR, | 32 SBOX_TEST_SECOND_ERROR, |
| 33 SBOX_TEST_THIRD_ERROR, | 33 SBOX_TEST_THIRD_ERROR, |
| 34 SBOX_TEST_FOURTH_ERROR, |
| 35 SBOX_TEST_FIFTH_ERROR, |
| 36 SBOX_TEST_SIXTH_ERROR, |
| 37 SBOX_TEST_SEVENTH_ERROR, |
| 34 SBOX_TEST_INVALID_PARAMETER, | 38 SBOX_TEST_INVALID_PARAMETER, |
| 35 SBOX_TEST_FAILED_TO_RUN_TEST, | 39 SBOX_TEST_FAILED_TO_RUN_TEST, |
| 36 SBOX_TEST_FAILED_TO_EXECUTE_COMMAND, | 40 SBOX_TEST_FAILED_TO_EXECUTE_COMMAND, |
| 37 SBOX_TEST_TIMED_OUT, | 41 SBOX_TEST_TIMED_OUT, |
| 38 SBOX_TEST_FAILED, | 42 SBOX_TEST_FAILED, |
| 39 SBOX_TEST_LAST_RESULT | 43 SBOX_TEST_LAST_RESULT |
| 40 }; | 44 }; |
| 41 | 45 |
| 42 inline bool IsSboxTestsResult(SboxTestResult result) { | 46 inline bool IsSboxTestsResult(SboxTestResult result) { |
| 43 unsigned int code = static_cast<unsigned int>(result); | 47 unsigned int code = static_cast<unsigned int>(result); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 144 |
| 141 // Constructs a full path to a file inside the system32 (or syswow64) folder. | 145 // Constructs a full path to a file inside the system32 (or syswow64) folder. |
| 142 std::wstring MakePathToSys(const wchar_t* name, bool is_obj_man_path); | 146 std::wstring MakePathToSys(const wchar_t* name, bool is_obj_man_path); |
| 143 | 147 |
| 144 // Runs the given test on the target process. | 148 // Runs the given test on the target process. |
| 145 int DispatchCall(int argc, wchar_t **argv); | 149 int DispatchCall(int argc, wchar_t **argv); |
| 146 | 150 |
| 147 } // namespace sandbox | 151 } // namespace sandbox |
| 148 | 152 |
| 149 #endif // SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ | 153 #endif // SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ |
| OLD | NEW |