summaryrefslogtreecommitdiffstats
path: root/sandbox/src/restricted_token_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/src/restricted_token_unittest.cc')
-rw-r--r--sandbox/src/restricted_token_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sandbox/src/restricted_token_unittest.cc b/sandbox/src/restricted_token_unittest.cc
index 310b73f..d8fe233 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);