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

Side by Side Diff: sandbox/win/tests/validation_tests/suite.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
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 // This file contains the validation tests for the sandbox. 5 // This file contains the validation tests for the sandbox.
6 // It includes the tests that need to be performed inside the 6 // It includes the tests that need to be performed inside the
7 // sandbox. 7 // sandbox.
8 8
9 #include <shlwapi.h> 9 #include <shlwapi.h>
10 10
11 #include "base/win/windows_version.h" 11 #include "base/win/windows_version.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "sandbox/tests/common/controller.h" 13 #include "sandbox/win/tests/common/controller.h"
14 14
15 #pragma comment(lib, "shlwapi.lib") 15 #pragma comment(lib, "shlwapi.lib")
16 16
17 namespace { 17 namespace {
18 18
19 void TestProcessAccess(sandbox::TestRunner* runner, DWORD target) { 19 void TestProcessAccess(sandbox::TestRunner* runner, DWORD target) {
20 const wchar_t *kCommandTemplate = L"OpenProcessCmd %d %d"; 20 const wchar_t *kCommandTemplate = L"OpenProcessCmd %d %d";
21 wchar_t command[1024] = {0}; 21 wchar_t command[1024] = {0};
22 22
23 // Test all the scary process permissions. 23 // Test all the scary process permissions.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Tests if the threads are correctly protected by the sandbox. 191 // Tests if the threads are correctly protected by the sandbox.
192 TEST(ValidationSuite, TestThread) { 192 TEST(ValidationSuite, TestThread) {
193 TestRunner runner; 193 TestRunner runner;
194 wchar_t command[1024] = {0}; 194 wchar_t command[1024] = {0};
195 195
196 wsprintf(command, L"OpenThreadCmd %d", ::GetCurrentThreadId()); 196 wsprintf(command, L"OpenThreadCmd %d", ::GetCurrentThreadId());
197 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command)); 197 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command));
198 } 198 }
199 199
200 } // namespace sandbox 200 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/tests/validation_tests/sbox_validation_tests.vcproj ('k') | sandbox/win/tests/validation_tests/unit_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698