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

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

Issue 1539423002: Revert of Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 #include <stddef.h>
11 10
12 #include "base/win/windows_version.h" 11 #include "base/win/windows_version.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "sandbox/win/tests/common/controller.h" 13 #include "sandbox/win/tests/common/controller.h"
14 #include "testing/gtest/include/gtest/gtest.h"
15 14
16 #pragma comment(lib, "shlwapi.lib") 15 #pragma comment(lib, "shlwapi.lib")
17 16
18 namespace { 17 namespace {
19 18
20 void TestProcessAccess(sandbox::TestRunner* runner, DWORD target) { 19 void TestProcessAccess(sandbox::TestRunner* runner, DWORD target) {
21 const wchar_t *kCommandTemplate = L"OpenProcessCmd %d %d"; 20 const wchar_t *kCommandTemplate = L"OpenProcessCmd %d %d";
22 wchar_t command[1024] = {0}; 21 wchar_t command[1024] = {0};
23 22
24 // Test all the scary process permissions. 23 // Test all the scary process permissions.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 TEST(ValidationSuite, TestMemoryNoLimit) { 232 TEST(ValidationSuite, TestMemoryNoLimit) {
234 TestRunner runner; 233 TestRunner runner;
235 wchar_t command[1024] = {0}; 234 wchar_t command[1024] = {0};
236 const int kAllocationSize = 256 * 1024 * 1024; 235 const int kAllocationSize = 256 * 1024 * 1024;
237 236
238 wsprintf(command, L"AllocateCmd %d", kAllocationSize); 237 wsprintf(command, L"AllocateCmd %d", kAllocationSize);
239 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(command)); 238 EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(command));
240 } 239 }
241 240
242 } // namespace sandbox 241 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/tests/validation_tests/commands.cc ('k') | sandbox/win/wow_helper/service64_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698