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

Side by Side Diff: sandbox/win/src/named_pipe_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/named_pipe_policy.cc ('k') | sandbox/win/src/nt_internals.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-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "sandbox/src/sandbox.h" 6 #include "sandbox/win/src/sandbox.h"
7 #include "sandbox/src/sandbox_policy.h" 7 #include "sandbox/win/src/sandbox_policy.h"
8 #include "sandbox/src/sandbox_factory.h" 8 #include "sandbox/win/src/sandbox_factory.h"
9 #include "sandbox/tests/common/controller.h" 9 #include "sandbox/win/tests/common/controller.h"
10 10
11 namespace sandbox { 11 namespace sandbox {
12 12
13 13
14 SBOX_TESTS_COMMAND int NamedPipe_Create(int argc, wchar_t **argv) { 14 SBOX_TESTS_COMMAND int NamedPipe_Create(int argc, wchar_t **argv) {
15 if (argc != 1) { 15 if (argc != 1) {
16 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; 16 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
17 } 17 }
18 if ((NULL == argv) || (NULL == argv[0])) { 18 if ((NULL == argv) || (NULL == argv[0])) {
19 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; 19 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // namedpipe name. Here we apply it like a wildcard. http://b/893603 69 // namedpipe name. Here we apply it like a wildcard. http://b/893603
70 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_NAMED_PIPES, 70 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_NAMED_PIPES,
71 TargetPolicy::NAMEDPIPES_ALLOW_ANY, 71 TargetPolicy::NAMEDPIPES_ALLOW_ANY,
72 L"\\\\.\\pipe\\test*")); 72 L"\\\\.\\pipe\\test*"));
73 73
74 EXPECT_EQ(SBOX_TEST_SUCCEEDED, 74 EXPECT_EQ(SBOX_TEST_SUCCEEDED,
75 runner.RunTest(L"NamedPipe_Create \\\\.\\pipe\\testbleh")); 75 runner.RunTest(L"NamedPipe_Create \\\\.\\pipe\\testbleh"));
76 } 76 }
77 77
78 } // namespace sandbox 78 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/named_pipe_policy.cc ('k') | sandbox/win/src/nt_internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698