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

Side by Side Diff: sandbox/win/src/unload_dll_test.cc

Issue 10689170: Move the Windows sandbox to sandbox/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of tree (properly this time) 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/threadpool_unittest.cc ('k') | sandbox/win/src/win2k_threadpool.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/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_factory.h" 7 #include "sandbox/win/src/sandbox_factory.h"
8 #include "sandbox/src/target_services.h" 8 #include "sandbox/win/src/target_services.h"
9 #include "sandbox/tests/common/controller.h" 9 #include "sandbox/win/tests/common/controller.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace sandbox { 12 namespace sandbox {
13 13
14 // Loads and or unloads a DLL passed in the second parameter of argv. 14 // Loads and or unloads a DLL passed in the second parameter of argv.
15 // The first parameter of argv is 'L' = load, 'U' = unload or 'B' for both. 15 // The first parameter of argv is 'L' = load, 'U' = unload or 'B' for both.
16 SBOX_TESTS_COMMAND int UseOneDLL(int argc, wchar_t **argv) { 16 SBOX_TESTS_COMMAND int UseOneDLL(int argc, wchar_t **argv) {
17 if (argc != 2) 17 if (argc != 2)
18 return SBOX_TEST_FAILED_TO_RUN_TEST; 18 return SBOX_TEST_FAILED_TO_RUN_TEST;
19 int rv = SBOX_TEST_FAILED_TO_RUN_TEST; 19 int rv = SBOX_TEST_FAILED_TO_RUN_TEST;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_SYNC, 87 EXPECT_TRUE(runner.AddRule(TargetPolicy::SUBSYS_SYNC,
88 TargetPolicy::EVENTS_ALLOW_ANY, L"tst0001")); 88 TargetPolicy::EVENTS_ALLOW_ANY, L"tst0001"));
89 89
90 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL L avicap32.dll")); 90 EXPECT_EQ(SBOX_TEST_FAILED, runner.RunTest(L"UseOneDLL L avicap32.dll"));
91 91
92 runner.SetTestState(AFTER_REVERT); 92 runner.SetTestState(AFTER_REVERT);
93 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"SimpleOpenEvent tst0001")); 93 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"SimpleOpenEvent tst0001"));
94 } 94 }
95 95
96 } // namespace sandbox 96 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/threadpool_unittest.cc ('k') | sandbox/win/src/win2k_threadpool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698