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

Side by Side Diff: chrome/test/security_tests/security_tests.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 | « chrome/test/base/chrome_test_launcher.cc ('k') | chrome/test/security_tests/security_tests.gyp » ('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) 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 <windows.h> 5 #include <windows.h>
6 #include <string> 6 #include <string>
7 7
8 #define TEST_INJECTION_DLL 8 #define TEST_INJECTION_DLL
9 #include "chrome/test/security_tests/ipc_security_tests.h" 9 #include "chrome/test/security_tests/ipc_security_tests.h"
10 #include "content/common/injection_test_dll.h" 10 #include "content/common/injection_test_dll.h"
11 #include "sandbox/tests/common/controller.h" 11 #include "sandbox/win/tests/common/controller.h"
12 #include "sandbox/tests/validation_tests/commands.h" 12 #include "sandbox/win/tests/validation_tests/commands.h"
13 13
14 using sandbox::TestOpenKey; 14 using sandbox::TestOpenKey;
15 using sandbox::TestOpenReadFile; 15 using sandbox::TestOpenReadFile;
16 using sandbox::TestOpenWriteFile; 16 using sandbox::TestOpenWriteFile;
17 17
18 #define SECURITY_CHECK(x) (*test_count)++; \ 18 #define SECURITY_CHECK(x) (*test_count)++; \
19 if (sandbox::SBOX_TEST_DENIED != x) { \ 19 if (sandbox::SBOX_TEST_DENIED != x) { \
20 return FALSE; \ 20 return FALSE; \
21 }; 21 };
22 22
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // number of tests executed, including the failing test. 55 // number of tests executed, including the failing test.
56 BOOL __declspec(dllexport) __cdecl RunPluginTests(int *test_count) { 56 BOOL __declspec(dllexport) __cdecl RunPluginTests(int *test_count) {
57 *test_count = 0; 57 *test_count = 0;
58 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%")); 58 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%"));
59 SECURITY_CHECK(TestOpenWriteFile(L"%ProgramFiles%")); 59 SECURITY_CHECK(TestOpenWriteFile(L"%ProgramFiles%"));
60 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%\\System32")); 60 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%\\System32"));
61 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%\\explorer.exe")); 61 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%\\explorer.exe"));
62 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%\\Cursors\\arrow_i.cur")); 62 SECURITY_CHECK(TestOpenWriteFile(L"%SystemRoot%\\Cursors\\arrow_i.cur"));
63 return TRUE; 63 return TRUE;
64 } 64 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_test_launcher.cc ('k') | chrome/test/security_tests/security_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698