OLD | NEW |
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 // Some tests for the framework itself. | 5 // Some tests for the framework itself. |
6 | 6 |
7 #include <stddef.h> | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | |
9 #include "sandbox/win/src/sandbox.h" | 8 #include "sandbox/win/src/sandbox.h" |
| 9 #include "sandbox/win/src/target_services.h" |
10 #include "sandbox/win/src/sandbox_factory.h" | 10 #include "sandbox/win/src/sandbox_factory.h" |
11 #include "sandbox/win/src/target_services.h" | |
12 #include "sandbox/win/tests/common/controller.h" | 11 #include "sandbox/win/tests/common/controller.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | |
14 | 12 |
15 namespace sandbox { | 13 namespace sandbox { |
16 | 14 |
17 // Returns the current process state. | 15 // Returns the current process state. |
18 SBOX_TESTS_COMMAND int IntegrationTestsTest_state(int argc, wchar_t **argv) { | 16 SBOX_TESTS_COMMAND int IntegrationTestsTest_state(int argc, wchar_t **argv) { |
19 if (!SandboxFactory::GetTargetServices()->GetState()->InitCalled()) | 17 if (!SandboxFactory::GetTargetServices()->GetState()->InitCalled()) |
20 return BEFORE_INIT; | 18 return BEFORE_INIT; |
21 | 19 |
22 if (!SandboxFactory::GetTargetServices()->GetState()->RevertedToSelf()) | 20 if (!SandboxFactory::GetTargetServices()->GetState()->RevertedToSelf()) |
23 return BEFORE_REVERT; | 21 return BEFORE_REVERT; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // running inside an outter job. | 297 // running inside an outter job. |
300 TEST(IntegrationTestsTest, RunJoblessChildFromInsideJob) { | 298 TEST(IntegrationTestsTest, RunJoblessChildFromInsideJob) { |
301 TestRunner runner; | 299 TestRunner runner; |
302 runner.SetUnsandboxed(true); | 300 runner.SetUnsandboxed(true); |
303 runner.SetTimeout(2000); | 301 runner.SetTimeout(2000); |
304 ASSERT_EQ(SBOX_TEST_SUCCEEDED, | 302 ASSERT_EQ(SBOX_TEST_SUCCEEDED, |
305 runner.RunTest(L"IntegrationTestsTest_job none")); | 303 runner.RunTest(L"IntegrationTestsTest_job none")); |
306 } | 304 } |
307 | 305 |
308 } // namespace sandbox | 306 } // namespace sandbox |
OLD | NEW |