| 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_TESTS_VALIDATION_TESTS_COMMANDS_H__ | 5 #ifndef SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__ |
| 6 #define SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__ | 6 #define SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__ |
| 7 | 7 |
| 8 #include <windows.h> |
| 9 |
| 10 #include "base/strings/string16.h" |
| 11 |
| 8 namespace sandbox { | 12 namespace sandbox { |
| 9 | 13 |
| 10 // Checks if window is a real window. Returns a SboxTestResult. | 14 // Checks if window is a real window. Returns a SboxTestResult. |
| 11 int TestValidWindow(HWND window); | 15 int TestValidWindow(HWND window); |
| 12 | 16 |
| 13 // Tries to open the process_id. Returns a SboxTestResult. | 17 // Tries to open the process_id. Returns a SboxTestResult. |
| 14 int TestOpenProcess(DWORD process_id, DWORD access_mask); | 18 int TestOpenProcess(DWORD process_id, DWORD access_mask); |
| 15 | 19 |
| 16 // Tries to open thread_id. Returns a SboxTestResult. | 20 // Tries to open thread_id. Returns a SboxTestResult. |
| 17 int TestOpenThread(DWORD thread_id); | 21 int TestOpenThread(DWORD thread_id); |
| 18 | 22 |
| 19 // Tries to open path for read access. Returns a SboxTestResult. | 23 // Tries to open path for read access. Returns a SboxTestResult. |
| 20 int TestOpenReadFile(const std::wstring& path); | 24 int TestOpenReadFile(const base::string16& path); |
| 21 | 25 |
| 22 // Tries to open path for write access. Returns a SboxTestResult. | 26 // Tries to open path for write access. Returns a SboxTestResult. |
| 23 int TestOpenWriteFile(const std::wstring& path); | 27 int TestOpenWriteFile(const base::string16& path); |
| 24 | 28 |
| 25 // Tries to open a registry key. | 29 // Tries to open a registry key. |
| 26 int TestOpenKey(HKEY base_key, std::wstring subkey); | 30 int TestOpenKey(HKEY base_key, base::string16 subkey); |
| 27 | 31 |
| 28 // Tries to open the workstation's input desktop as long as the | 32 // Tries to open the workstation's input desktop as long as the |
| 29 // current desktop is not the interactive one. Returns a SboxTestResult. | 33 // current desktop is not the interactive one. Returns a SboxTestResult. |
| 30 int TestOpenInputDesktop(); | 34 int TestOpenInputDesktop(); |
| 31 | 35 |
| 32 // Tries to switch the interactive desktop. Returns a SboxTestResult. | 36 // Tries to switch the interactive desktop. Returns a SboxTestResult. |
| 33 int TestSwitchDesktop(); | 37 int TestSwitchDesktop(); |
| 34 | 38 |
| 35 } // namespace sandbox | 39 } // namespace sandbox |
| 36 | 40 |
| 37 #endif // SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__ | 41 #endif // SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__ |
| OLD | NEW |