diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 22:42:25 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-23 22:42:25 +0000 |
commit | 27d753ac9ecc5afa4e49214e486d5dfbb50ce588 (patch) | |
tree | 58a3bdc2b415c6d99fe7431a7535927d84074d86 /sandbox/src | |
parent | 34f993563386ad569f3674d157153e697e847e0a (diff) | |
download | chromium_src-27d753ac9ecc5afa4e49214e486d5dfbb50ce588.zip chromium_src-27d753ac9ecc5afa4e49214e486d5dfbb50ce588.tar.gz chromium_src-27d753ac9ecc5afa4e49214e486d5dfbb50ce588.tar.bz2 |
Fix the POC and some of unit tests to be build and
run correctly in 64 bit.
BUG=27218
Review URL: http://codereview.chromium.org/1168002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42392 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src')
-rw-r--r-- | sandbox/src/policy_target_test.cc | 3 | ||||
-rw-r--r-- | sandbox/src/registry_policy_test.cc | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sandbox/src/policy_target_test.cc b/sandbox/src/policy_target_test.cc index d4ffb40..98f2418 100644 --- a/sandbox/src/policy_target_test.cc +++ b/sandbox/src/policy_target_test.cc @@ -209,8 +209,6 @@ TEST(PolicyTargetTest, OpenProcess) { "Opens a process"; } -#if !defined(_WIN64) - // Launches the app in the sandbox and ask it to wait in an // infinite loop. Waits for 2 seconds and then check if the // desktop associated with the app thread is not the same as the @@ -338,6 +336,5 @@ TEST(PolicyTargetTest, WinstaPolicy) { temp_policy->DestroyAlternateDesktop(); temp_policy->Release(); } -#endif // _WIN64 } // namespace sandbox diff --git a/sandbox/src/registry_policy_test.cc b/sandbox/src/registry_policy_test.cc index 1cc9b89..cdc1577 100644 --- a/sandbox/src/registry_policy_test.cc +++ b/sandbox/src/registry_policy_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2010 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. @@ -102,12 +102,14 @@ TEST(RegistryPolicyTest, TestKeyAnyAccess) { EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest( L"Reg_OpenKey open read HKEY_LOCAL_MACHINE software\\microsoft")); - // Tests write access on key allowed for read-write. - EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest( - L"Reg_OpenKey create write HKEY_LOCAL_MACHINE software\\microsoft")); + if (::IsUserAnAdmin()) { + // Tests write access on key allowed for read-write. + EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest( + L"Reg_OpenKey create write HKEY_LOCAL_MACHINE software\\microsoft")); - EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest( - L"Reg_OpenKey open write HKEY_LOCAL_MACHINE software\\microsoft")); + EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest( + L"Reg_OpenKey open write HKEY_LOCAL_MACHINE software\\microsoft")); + } // Tests subdirectory access on keys where we don't have subdirectory acess. EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Reg_OpenKey create read " |