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

Side by Side Diff: sandbox/tests/validation_tests/suite.cc

Issue 757001: Second round of sbox changes for 64 bit port... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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/tests/validation_tests/commands.cc ('k') | no next file » | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 wsprintf(command, L"ValidWindow %d", ::FindWindow(NULL, NULL)); 93 wsprintf(command, L"ValidWindow %d", ::FindWindow(NULL, NULL));
94 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command)); 94 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command));
95 } 95 }
96 96
97 // Tests if the processes are correctly protected by the sandbox. 97 // Tests if the processes are correctly protected by the sandbox.
98 TEST(ValidationSuite, TestProcess) { 98 TEST(ValidationSuite, TestProcess) {
99 TestRunner runner; 99 TestRunner runner;
100 wchar_t command[1024] = {0}; 100 wchar_t command[1024] = {0};
101 101
102 wsprintf(command, L"OpenProcess %d", ::GetCurrentProcessId()); 102 wsprintf(command, L"OpenProcessCmd %d", ::GetCurrentProcessId());
103 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command)); 103 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command));
104 } 104 }
105 105
106 // Tests if the threads are correctly protected by the sandbox. 106 // Tests if the threads are correctly protected by the sandbox.
107 TEST(ValidationSuite, TestThread) { 107 TEST(ValidationSuite, TestThread) {
108 TestRunner runner; 108 TestRunner runner;
109 wchar_t command[1024] = {0}; 109 wchar_t command[1024] = {0};
110 110
111 wsprintf(command, L"OpenThread %d", ::GetCurrentThreadId()); 111 wsprintf(command, L"OpenThreadCmd %d", ::GetCurrentThreadId());
112 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command)); 112 EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command));
113 } 113 }
114 114
115 } // namespace sandbox 115 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/tests/validation_tests/commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698