commands.h revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
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 12namespace sandbox { 13 14// Checks if window is a real window. Returns a SboxTestResult. 15int TestValidWindow(HWND window); 16 17// Tries to open the process_id. Returns a SboxTestResult. 18int TestOpenProcess(DWORD process_id, DWORD access_mask); 19 20// Tries to open thread_id. Returns a SboxTestResult. 21int TestOpenThread(DWORD thread_id); 22 23// Tries to open path for read access. Returns a SboxTestResult. 24int TestOpenReadFile(const base::string16& path); 25 26// Tries to open path for write access. Returns a SboxTestResult. 27int TestOpenWriteFile(const base::string16& path); 28 29// Tries to open a registry key. 30int 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. 34int TestOpenInputDesktop(); 35 36// Tries to switch the interactive desktop. Returns a SboxTestResult. 37int TestSwitchDesktop(); 38 39} // namespace sandbox 40 41#endif // SANDBOX_TESTS_VALIDATION_TESTS_COMMANDS_H__ 42