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

Side by Side Diff: chrome/installer/setup/setup_util_unittest.cc

Issue 18584011: Rename base::Delete to base::DeleteFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/setup/uninstall.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) 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 #include "chrome/installer/setup/setup_util_unittest.h" 5 #include "chrome/installer/setup/setup_util_unittest.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Test that we are parsing Chrome version correctly. 117 // Test that we are parsing Chrome version correctly.
118 TEST_F(SetupUtilTestWithDir, GetMaxVersionFromArchiveDirTest) { 118 TEST_F(SetupUtilTestWithDir, GetMaxVersionFromArchiveDirTest) {
119 // Create a version dir 119 // Create a version dir
120 base::FilePath chrome_dir = test_dir_.path().AppendASCII("1.0.0.0"); 120 base::FilePath chrome_dir = test_dir_.path().AppendASCII("1.0.0.0");
121 file_util::CreateDirectory(chrome_dir); 121 file_util::CreateDirectory(chrome_dir);
122 ASSERT_TRUE(base::PathExists(chrome_dir)); 122 ASSERT_TRUE(base::PathExists(chrome_dir));
123 scoped_ptr<Version> version( 123 scoped_ptr<Version> version(
124 installer::GetMaxVersionFromArchiveDir(test_dir_.path())); 124 installer::GetMaxVersionFromArchiveDir(test_dir_.path()));
125 ASSERT_EQ(version->GetString(), "1.0.0.0"); 125 ASSERT_EQ(version->GetString(), "1.0.0.0");
126 126
127 base::Delete(chrome_dir, true); 127 base::DeleteFile(chrome_dir, true);
128 ASSERT_FALSE(base::PathExists(chrome_dir)); 128 ASSERT_FALSE(base::PathExists(chrome_dir));
129 ASSERT_TRUE(installer::GetMaxVersionFromArchiveDir(test_dir_.path()) == NULL); 129 ASSERT_TRUE(installer::GetMaxVersionFromArchiveDir(test_dir_.path()) == NULL);
130 130
131 chrome_dir = test_dir_.path().AppendASCII("ABC"); 131 chrome_dir = test_dir_.path().AppendASCII("ABC");
132 file_util::CreateDirectory(chrome_dir); 132 file_util::CreateDirectory(chrome_dir);
133 ASSERT_TRUE(base::PathExists(chrome_dir)); 133 ASSERT_TRUE(base::PathExists(chrome_dir));
134 ASSERT_TRUE(installer::GetMaxVersionFromArchiveDir(test_dir_.path()) == NULL); 134 ASSERT_TRUE(installer::GetMaxVersionFromArchiveDir(test_dir_.path()) == NULL);
135 135
136 chrome_dir = test_dir_.path().AppendASCII("2.3.4.5"); 136 chrome_dir = test_dir_.path().AppendASCII("2.3.4.5");
137 file_util::CreateDirectory(chrome_dir); 137 file_util::CreateDirectory(chrome_dir);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // sufficiently recent operating systems. 270 // sufficiently recent operating systems.
271 TEST(SetupUtilTest, AdjustFromBelowNormalPriority) { 271 TEST(SetupUtilTest, AdjustFromBelowNormalPriority) {
272 scoped_ptr<ScopedPriorityClass> below_normal = 272 scoped_ptr<ScopedPriorityClass> below_normal =
273 ScopedPriorityClass::Create(BELOW_NORMAL_PRIORITY_CLASS); 273 ScopedPriorityClass::Create(BELOW_NORMAL_PRIORITY_CLASS);
274 ASSERT_TRUE(below_normal); 274 ASSERT_TRUE(below_normal);
275 if (base::win::GetVersion() > base::win::VERSION_SERVER_2003) 275 if (base::win::GetVersion() > base::win::VERSION_SERVER_2003)
276 EXPECT_EQ(PCCR_CHANGED, RelaunchAndDoProcessPriorityAdjustment()); 276 EXPECT_EQ(PCCR_CHANGED, RelaunchAndDoProcessPriorityAdjustment());
277 else 277 else
278 EXPECT_EQ(PCCR_UNCHANGED, RelaunchAndDoProcessPriorityAdjustment()); 278 EXPECT_EQ(PCCR_UNCHANGED, RelaunchAndDoProcessPriorityAdjustment());
279 } 279 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698