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 | 6 |
7 #define _ATL_NO_EXCEPTIONS | 7 #define _ATL_NO_EXCEPTIONS |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlsecurity.h> | 9 #include <atlsecurity.h> |
10 | 10 |
11 #include "base/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/win/scoped_handle.h" | 12 #include "base/win/scoped_handle.h" |
13 #include "base/win/windows_version.h" | 13 #include "base/win/windows_version.h" |
14 #include "sandbox/win/src/sync_policy_test.h" | 14 #include "sandbox/win/src/sync_policy_test.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 const wchar_t kAppContainerName[] = L"sbox_test"; | 19 const wchar_t kAppContainerName[] = L"sbox_test"; |
20 const wchar_t kAppContainerSid[] = | 20 const wchar_t kAppContainerSid[] = |
21 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" | 21 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 TEST(AppContainerTest, RequiresImpersonation) { | 134 TEST(AppContainerTest, RequiresImpersonation) { |
135 if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8) | 135 if (base::win::OSInfo::GetInstance()->version() < base::win::VERSION_WIN8) |
136 return; | 136 return; |
137 | 137 |
138 TestRunner runner(JOB_UNPROTECTED, USER_RESTRICTED, USER_RESTRICTED); | 138 TestRunner runner(JOB_UNPROTECTED, USER_RESTRICTED, USER_RESTRICTED); |
139 EXPECT_EQ(SBOX_ERROR_CANNOT_INIT_APPCONTAINER, | 139 EXPECT_EQ(SBOX_ERROR_CANNOT_INIT_APPCONTAINER, |
140 runner.GetPolicy()->SetAppContainer(kAppContainerSid)); | 140 runner.GetPolicy()->SetAppContainer(kAppContainerSid)); |
141 } | 141 } |
142 | 142 |
143 } // namespace sandbox | 143 } // namespace sandbox |
OLD | NEW |