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

Side by Side Diff: base/security_unittest.cc

Issue 11961021: base: Convert scoped_arrays to the new scoped_ptr style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert callback changes Created 7 years, 11 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <stdio.h> 5 #include <stdio.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 TEST(SecurityTest, ALLOC_TEST(MemoryAllocationRestrictionsNew)) { 89 TEST(SecurityTest, ALLOC_TEST(MemoryAllocationRestrictionsNew)) {
90 if (!IsTcMallocBypassed()) { 90 if (!IsTcMallocBypassed()) {
91 scoped_ptr<VeryLargeStruct> ptr(new (nothrow) VeryLargeStruct); 91 scoped_ptr<VeryLargeStruct> ptr(new (nothrow) VeryLargeStruct);
92 ASSERT_TRUE(ptr == NULL); 92 ASSERT_TRUE(ptr == NULL);
93 } 93 }
94 } 94 }
95 95
96 TEST(SecurityTest, ALLOC_TEST(MemoryAllocationRestrictionsNewArray)) { 96 TEST(SecurityTest, ALLOC_TEST(MemoryAllocationRestrictionsNewArray)) {
97 if (!IsTcMallocBypassed()) { 97 if (!IsTcMallocBypassed()) {
98 scoped_array<char> ptr(new (nothrow) char[kTooBigAllocSize]); 98 scoped_ptr<char[]> ptr(new (nothrow) char[kTooBigAllocSize]);
99 ASSERT_TRUE(ptr == NULL); 99 ASSERT_TRUE(ptr == NULL);
100 } 100 }
101 } 101 }
102 102
103 } // namespace 103 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698