• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
8 #include <windows.h>
9 
10 #include "base/strings/string16.h"
11 
12 namespace sandbox {
13 
14 // Checks if window is a real window. Returns a SboxTestResult.
15 int TestValidWindow(HWND window);
16 
17 // Tries to open the process_id. Returns a SboxTestResult.
18 int TestOpenProcess(DWORD process_id, DWORD access_mask);
19 
20 // Tries to open thread_id. Returns a SboxTestResult.
21 int TestOpenThread(DWORD thread_id);
22 
23 // Tries to open path for read access. Returns a SboxTestResult.
24 int TestOpenReadFile(const base::string16& path);
25 
26 // Tries to open path for write access. Returns a SboxTestResult.
27 int TestOpenWriteFile(const base::string16& path);
28 
29 // Tries to open a registry key.
30 int TestOpenKey(HKEY base_key, base::string16 subkey);
31 
32 // Tries to open the workstation's input desktop as long as the
33 // current desktop is not the interactive one. Returns a SboxTestResult.
34 int TestOpenInputDesktop();
35 
36 // Tries to switch the interactive desktop. Returns a SboxTestResult.
37 int TestSwitchDesktop();
38 
39 // Tries to open the alternate desktop. Returns a SboxTestResult.
40 int TestOpenAlternateDesktop(wchar_t *desktop_name);
41 
42 // Tries to enumerate desktops on the alternate windowstation.
43 // Returns a SboxTestResult.
44 int TestEnumAlternateWinsta();
45 
46 }  // namespace sandbox
47 
48 #endif  // SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__
49