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 #include <windows.h> | 5 #include <windows.h> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "sandbox/tests/validation_tests/commands.h" | 8 #include "sandbox/win/tests/validation_tests/commands.h" |
9 | 9 |
10 #include "sandbox/tests/common/controller.h" | 10 #include "sandbox/win/tests/common/controller.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // Returns the HKEY corresponding to name. If there is no HKEY corresponding | 14 // Returns the HKEY corresponding to name. If there is no HKEY corresponding |
15 // to the name it returns NULL. | 15 // to the name it returns NULL. |
16 HKEY GetHKEYFromString(const std::wstring &name) { | 16 HKEY GetHKEYFromString(const std::wstring &name) { |
17 if (L"HKLM" == name) | 17 if (L"HKLM" == name) |
18 return HKEY_LOCAL_MACHINE; | 18 return HKEY_LOCAL_MACHINE; |
19 else if (L"HKCR" == name) | 19 else if (L"HKCR" == name) |
20 return HKEY_CLASSES_ROOT; | 20 return HKEY_CLASSES_ROOT; |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 SBOX_TESTS_COMMAND int SleepCmd(int argc, wchar_t **argv) { | 253 SBOX_TESTS_COMMAND int SleepCmd(int argc, wchar_t **argv) { |
254 if (1 != argc) | 254 if (1 != argc) |
255 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; | 255 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; |
256 | 256 |
257 ::Sleep(_wtoi(argv[0])); | 257 ::Sleep(_wtoi(argv[0])); |
258 return SBOX_TEST_SUCCEEDED; | 258 return SBOX_TEST_SUCCEEDED; |
259 } | 259 } |
260 | 260 |
261 | 261 |
262 } // namespace sandbox | 262 } // namespace sandbox |
OLD | NEW |