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

Side by Side Diff: sandbox/win/src/handle_policy_test.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/handle_policy.cc ('k') | sandbox/win/src/handle_table.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/stringprintf.h" 5 #include "base/stringprintf.h"
6 #include "sandbox/src/handle_policy.h" 6 #include "sandbox/win/src/handle_policy.h"
7 #include "sandbox/src/nt_internals.h" 7 #include "sandbox/win/src/nt_internals.h"
8 #include "sandbox/src/sandbox.h" 8 #include "sandbox/win/src/sandbox.h"
9 #include "sandbox/src/sandbox_factory.h" 9 #include "sandbox/win/src/sandbox_factory.h"
10 #include "sandbox/src/sandbox_policy.h" 10 #include "sandbox/win/src/sandbox_policy.h"
11 #include "sandbox/src/win_utils.h" 11 #include "sandbox/win/src/win_utils.h"
12 #include "sandbox/tests/common/controller.h" 12 #include "sandbox/win/tests/common/controller.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 // Just waits for the supplied number of milliseconds. 17 // Just waits for the supplied number of milliseconds.
18 SBOX_TESTS_COMMAND int Handle_WaitProcess(int argc, wchar_t **argv) { 18 SBOX_TESTS_COMMAND int Handle_WaitProcess(int argc, wchar_t **argv) {
19 if (argc != 1) 19 if (argc != 1)
20 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; 20 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
21 21
22 ::Sleep(::wcstoul(argv[0], NULL, 10)); 22 ::Sleep(::wcstoul(argv[0], NULL, 10));
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // Now successfully open the event after adding a broker handle rule. 106 // Now successfully open the event after adding a broker handle rule.
107 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_HANDLES, 107 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_HANDLES,
108 TargetPolicy::HANDLES_DUP_BROKER, 108 TargetPolicy::HANDLES_DUP_BROKER,
109 L"Event")); 109 L"Event"));
110 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(cmd_line.c_str())); 110 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(cmd_line.c_str()));
111 } 111 }
112 112
113 } // namespace sandbox 113 } // namespace sandbox
114 114
OLDNEW
« no previous file with comments | « sandbox/win/src/handle_policy.cc ('k') | sandbox/win/src/handle_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698