| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/win/scoped_handle.h" | 5 #include "base/win/scoped_handle.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/src/nt_internals.h" | 9 #include "sandbox/win/src/nt_internals.h" |
| 10 #include "sandbox/tests/common/controller.h" | 10 #include "sandbox/win/tests/common/controller.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace sandbox { | 13 namespace sandbox { |
| 14 | 14 |
| 15 SBOX_TESTS_COMMAND int Event_Open(int argc, wchar_t **argv) { | 15 SBOX_TESTS_COMMAND int Event_Open(int argc, wchar_t **argv) { |
| 16 if (argc != 2) | 16 if (argc != 2) |
| 17 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; | 17 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; |
| 18 | 18 |
| 19 DWORD desired_access = SYNCHRONIZE; | 19 DWORD desired_access = SYNCHRONIZE; |
| 20 if (L'f' == argv[0][0]) | 20 if (L'f' == argv[0][0]) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"Event_Open s test2")); | 136 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"Event_Open s test2")); |
| 137 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_Open f test3")); | 137 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_Open f test3")); |
| 138 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_Open s test4")); | 138 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_Open s test4")); |
| 139 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen f f test5")); | 139 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen f f test5")); |
| 140 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen t f test6")); | 140 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen t f test6")); |
| 141 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen f t test5")); | 141 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen f t test5")); |
| 142 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen t t test6")); | 142 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(L"Event_CreateOpen t t test6")); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace sandbox | 145 } // namespace sandbox |
| OLD | NEW |