OLD | NEW |
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 Loading... |
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 |
OLD | NEW |