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

Side by Side Diff: sandbox/win/src/restricted_token_unittest.cc

Issue 10783004: Move Windows Sandbox, trybots version (don't commit me!) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to top of tree Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/restricted_token.cc ('k') | sandbox/win/src/restricted_token_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This file contains unit tests for the RestrictedToken. 5 // This file contains unit tests for the RestrictedToken.
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 #include <vector> 10 #include <vector>
11 #include "sandbox/src/restricted_token.h" 11 #include "sandbox/win/src/restricted_token.h"
12 #include "sandbox/src/sid.h" 12 #include "sandbox/win/src/sid.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace sandbox { 15 namespace sandbox {
16 16
17 // Tests the initializatioin with an invalid token handle. 17 // Tests the initializatioin with an invalid token handle.
18 TEST(RestrictedTokenTest, InvalidHandle) { 18 TEST(RestrictedTokenTest, InvalidHandle) {
19 RestrictedToken token; 19 RestrictedToken token;
20 ASSERT_EQ(ERROR_INVALID_HANDLE, token.Init(reinterpret_cast<HANDLE>(0x5555))); 20 ASSERT_EQ(ERROR_INVALID_HANDLE, token.Init(reinterpret_cast<HANDLE>(0x5555)));
21 } 21 }
22 22
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 TEST(RestrictedTokenTest, DoubleInit) { 521 TEST(RestrictedTokenTest, DoubleInit) {
522 RestrictedToken token; 522 RestrictedToken token;
523 ASSERT_EQ(ERROR_SUCCESS, token.Init(NULL)); 523 ASSERT_EQ(ERROR_SUCCESS, token.Init(NULL));
524 524
525 ASSERT_EQ(ERROR_ALREADY_INITIALIZED, token.Init(NULL)); 525 ASSERT_EQ(ERROR_ALREADY_INITIALIZED, token.Init(NULL));
526 } 526 }
527 527
528 #endif 528 #endif
529 529
530 } // namespace sandbox 530 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/restricted_token.cc ('k') | sandbox/win/src/restricted_token_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698