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

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

Issue 497083004: Change base/file_utils.h includes to base/files/file_utils.h in chrome/, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@file_util
Patch Set: Created 6 years, 4 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/logging_installer.cc ('k') | chrome/installer/util/lzma_util.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/file_util.h"
8 #include "base/files/file.h" 7 #include "base/files/file.h"
9 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "base/win/scoped_handle.h" 11 #include "base/win/scoped_handle.h"
12 #include "chrome/installer/util/logging_installer.h" 12 #include "chrome/installer/util/logging_installer.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 TEST(LoggingInstallerTest, TestTruncate) { 15 TEST(LoggingInstallerTest, TestTruncate) {
16 const std::string test_data(installer::kMaxInstallerLogFileSize + 1, 'a'); 16 const std::string test_data(installer::kMaxInstallerLogFileSize + 1, 'a');
17 17
18 base::ScopedTempDir temp_dir; 18 base::ScopedTempDir temp_dir;
19 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 19 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 base::File::FLAG_EXCLUSIVE_READ; 108 base::File::FLAG_EXCLUSIVE_READ;
109 base::FilePath temp_file_move_dest( 109 base::FilePath temp_file_move_dest(
110 temp_file.value() + FILE_PATH_LITERAL(".tmp")); 110 temp_file.value() + FILE_PATH_LITERAL(".tmp"));
111 base::File temp_move_destination_file(temp_file_move_dest, file_flags); 111 base::File temp_move_destination_file(temp_file_move_dest, file_flags);
112 ASSERT_TRUE(temp_move_destination_file.IsValid()); 112 ASSERT_TRUE(temp_move_destination_file.IsValid());
113 113
114 EXPECT_EQ(installer::LOGFILE_DELETED, 114 EXPECT_EQ(installer::LOGFILE_DELETED,
115 installer::TruncateLogFileIfNeeded(temp_file)); 115 installer::TruncateLogFileIfNeeded(temp_file));
116 EXPECT_FALSE(base::PathExists(temp_file)); 116 EXPECT_FALSE(base::PathExists(temp_file));
117 } 117 }
OLDNEW
« no previous file with comments | « chrome/installer/util/logging_installer.cc ('k') | chrome/installer/util/lzma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698