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

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

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