Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Unified Diff: sandbox/src/registry_policy_test.cc

Issue 1168002: Fix the POC and some of unit tests to be build and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/src/policy_target_test.cc ('k') | sandbox/tools/finder/ntundoc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/registry_policy_test.cc
===================================================================
--- sandbox/src/registry_policy_test.cc (revision 42238)
+++ sandbox/src/registry_policy_test.cc (working copy)
@@ -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 @@
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 "
« no previous file with comments | « sandbox/src/policy_target_test.cc ('k') | sandbox/tools/finder/ntundoc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698