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

Side by Side Diff: chrome/installer/util/lzma_file_allocator_unittest.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « chrome/installer/util/lzma_file_allocator.h ('k') | chrome/installer/util/lzma_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/installer/util/lzma_file_allocator.h" 5 #include "chrome/installer/util/lzma_file_allocator.h"
6 6
7 #include <stddef.h>
8
7 #include <string> 9 #include <string>
8 10
9 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
11 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
12 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
13 15
14 class LzmaFileAllocatorTest : public testing::Test { 16 class LzmaFileAllocatorTest : public testing::Test {
15 protected: 17 protected:
16 void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } 18 void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 TEST_F(LzmaFileAllocatorTest, ErrorAndFallbackTest) { 73 TEST_F(LzmaFileAllocatorTest, ErrorAndFallbackTest) {
72 LzmaFileAllocator allocator(temp_dir_.path()); 74 LzmaFileAllocator allocator(temp_dir_.path());
73 allocator.mapped_file_.Close(); 75 allocator.mapped_file_.Close();
74 char* s = reinterpret_cast<char*>(IAlloc_Alloc(&allocator, 10)); 76 char* s = reinterpret_cast<char*>(IAlloc_Alloc(&allocator, 10));
75 EXPECT_NE(nullptr, s); 77 EXPECT_NE(nullptr, s);
76 ASSERT_FALSE(allocator.file_mapping_handle_.IsValid()); 78 ASSERT_FALSE(allocator.file_mapping_handle_.IsValid());
77 EXPECT_EQ(static_cast<DWORD>(MEM_PRIVATE), GetMemoryType(s)); 79 EXPECT_EQ(static_cast<DWORD>(MEM_PRIVATE), GetMemoryType(s));
78 80
79 IAlloc_Free(&allocator, s); 81 IAlloc_Free(&allocator, s);
80 } 82 }
OLDNEW
« no previous file with comments | « chrome/installer/util/lzma_file_allocator.h ('k') | chrome/installer/util/lzma_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698