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