| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <atlsecurity.h> | 6 #include <atlsecurity.h> |
| 7 | 7 |
| 8 #include "base/win/windows_version.h" | 8 #include "base/win/windows_version.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "sandbox/src/sandbox.h" | 10 #include "sandbox/win/src/sandbox.h" |
| 11 #include "sandbox/src/sandbox_policy.h" | 11 #include "sandbox/win/src/sandbox_policy.h" |
| 12 #include "sandbox/src/sandbox_factory.h" | 12 #include "sandbox/win/src/sandbox_factory.h" |
| 13 #include "sandbox/tests/common/controller.h" | 13 #include "sandbox/win/tests/common/controller.h" |
| 14 | 14 |
| 15 namespace sandbox { | 15 namespace sandbox { |
| 16 | 16 |
| 17 | 17 |
| 18 SBOX_TESTS_COMMAND int CheckIntegrityLevel(int argc, wchar_t **argv) { | 18 SBOX_TESTS_COMMAND int CheckIntegrityLevel(int argc, wchar_t **argv) { |
| 19 ATL::CAccessToken token; | 19 ATL::CAccessToken token; |
| 20 if (!token.GetEffectiveToken(TOKEN_READ)) | 20 if (!token.GetEffectiveToken(TOKEN_READ)) |
| 21 return SBOX_TEST_FAILED; | 21 return SBOX_TEST_FAILED; |
| 22 | 22 |
| 23 char* buffer[100]; | 23 char* buffer[100]; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 return; | 81 return; |
| 82 | 82 |
| 83 TestRunner runner(JOB_LOCKDOWN, USER_INTERACTIVE, USER_INTERACTIVE); | 83 TestRunner runner(JOB_LOCKDOWN, USER_INTERACTIVE, USER_INTERACTIVE); |
| 84 | 84 |
| 85 runner.SetTimeout(INFINITE); | 85 runner.SetTimeout(INFINITE); |
| 86 | 86 |
| 87 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"CheckIntegrityLevel")); | 87 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"CheckIntegrityLevel")); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace sandbox | 90 } // namespace sandbox |
| OLD | NEW |