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

Unified Diff: sandbox/src/restricted_token_unittest.cc

Issue 2253001: Revert 48186, 48196, 48198 (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 7 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/job_unittest.cc ('k') | sandbox/src/win_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/restricted_token_unittest.cc
diff --git a/sandbox/src/restricted_token_unittest.cc b/sandbox/src/restricted_token_unittest.cc
index 310b73f8e2428c0f7599ec98f5826bfd514a3319..d8fe233f294f98c34e43b255227ed8d92434454b 100644
--- a/sandbox/src/restricted_token_unittest.cc
+++ b/sandbox/src/restricted_token_unittest.cc
@@ -23,11 +23,11 @@ TEST(RestrictedTokenTest, InvalidHandle) {
// Tests the initialization with NULL as parameter.
TEST(RestrictedTokenTest, DefaultInit) {
// Get the current process token.
- HANDLE token_handle = INVALID_HANDLE_VALUE;
+ HANDLE token_handle = NULL;
ASSERT_TRUE(::OpenProcessToken(::GetCurrentProcess(), TOKEN_ALL_ACCESS,
&token_handle));
- ASSERT_NE(INVALID_HANDLE_VALUE, token_handle);
+ ASSERT_NE(NULL, reinterpret_cast<ULONG_PTR>(token_handle));
ATL::CAccessToken access_token;
access_token.Attach(token_handle);
@@ -62,11 +62,11 @@ TEST(RestrictedTokenTest, DefaultInit) {
// Tests the initialization with a custom token as parameter.
TEST(RestrictedTokenTest, CustomInit) {
// Get the current process token.
- HANDLE token_handle = INVALID_HANDLE_VALUE;
+ HANDLE token_handle = NULL;
ASSERT_TRUE(::OpenProcessToken(::GetCurrentProcess(), TOKEN_ALL_ACCESS,
&token_handle));
- ASSERT_NE(INVALID_HANDLE_VALUE, token_handle);
+ ASSERT_NE(NULL, reinterpret_cast<ULONG_PTR>(token_handle));
ATL::CAccessToken access_token;
access_token.Attach(token_handle);
« no previous file with comments | « sandbox/src/job_unittest.cc ('k') | sandbox/src/win_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698