summaryrefslogtreecommitdiffstats
path: root/sandbox/tests/validation_tests/commands.h
blob: 47f7c26f8eda0c12357067e9d1c0394b3de7cb81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__
#define SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__

namespace sandbox {

// Checks if window is a real window. Returns a SboxTestResult.
int TestValidWindow(HWND window);

// Tries to open the process_id. Returns a SboxTestResult.
int TestOpenProcess(DWORD process_id);

// Tries to open thread_id. Returns a SboxTestResult.
int TestOpenThread(DWORD thread_id);

// Tries to open path for read access. Returns a SboxTestResult.
int TestOpenReadFile(const std::wstring& path);

// Tries to open path for write access. Returns a SboxTestResult.
int TestOpenWriteFile(const std::wstring& path);

// Tries to open a registry key.
int TestOpenKey(HKEY base_key, std::wstring subkey);

// Tries to open the workstation's input desktop as long as the
// current desktop is not the interactive one. Returns a SboxTestResult.
int TestOpenInputDesktop();

// Tries to switch the interactive desktop. Returns a SboxTestResult.
int TestSwitchDesktop();

}  // namespace sandbox

#endif  // SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__