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

Unified Diff: chrome/browser/win/jumplist_file_util_unittest.cc

Issue 2836363003: Retire some metrics and update file util methods for JumpList (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into retiresomejumplistmetrics Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/win/jumplist_file_util.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/jumplist_file_util_unittest.cc
diff --git a/chrome/browser/win/jumplist_file_util_unittest.cc b/chrome/browser/win/jumplist_file_util_unittest.cc
index 6bb993dca85c172519e589262b470aba48457804..b4cfbfb29bc147e04da4d932231f3ed55bfc1dbe 100644
--- a/chrome/browser/win/jumplist_file_util_unittest.cc
+++ b/chrome/browser/win/jumplist_file_util_unittest.cc
@@ -52,7 +52,7 @@ TEST_F(JumpListFileUtilTest, DeleteDirectoryContent) {
// Delete the directory content using DeleteDirectoryContent(). The file
// should be deleted and the directory remains.
- ASSERT_EQ(DeleteDirectoryContent(dir_path, kFileDeleteLimit), SUCCEED);
+ DeleteDirectoryContent(dir_path, kFileDeleteLimit);
EXPECT_FALSE(PathExists(file_name));
EXPECT_TRUE(DirectoryExists(dir_path));
}
@@ -66,14 +66,14 @@ TEST_F(JumpListFileUtilTest, DeleteSubDirectory) {
ASSERT_NO_FATAL_FAILURE(CreateDirectory(test_subdir));
// Delete the directory using DeleteDirectory(), which should fail because
- // a subdirectory exists.
- ASSERT_EQ(DeleteDirectory(dir_path, kFileDeleteLimit),
- FAIL_SUBDIRECTORY_EXISTS);
+ // a subdirectory exists. Therefore, both root directory and sub-directory
+ // should still exist.
+ DeleteDirectory(dir_path, kFileDeleteLimit);
EXPECT_TRUE(DirectoryExists(dir_path));
EXPECT_TRUE(DirectoryExists(test_subdir));
// Delete the subdirectory alone should be working.
- ASSERT_EQ(DeleteDirectory(test_subdir, kFileDeleteLimit), SUCCEED);
+ DeleteDirectory(test_subdir, kFileDeleteLimit);
EXPECT_TRUE(DirectoryExists(dir_path));
EXPECT_FALSE(DirectoryExists(test_subdir));
}
@@ -92,11 +92,11 @@ TEST_F(JumpListFileUtilTest, DeleteMaxFilesAllowed) {
// Delete the directory content using DeleteDirectoryContent().
// Sine the maximum files allowed to delete is 1, only 1 out of the 2
// files is deleted. Therefore, the directory is not empty yet.
- ASSERT_EQ(DeleteDirectoryContent(dir_path, kFileDeleteLimitForTest), SUCCEED);
+ DeleteDirectoryContent(dir_path, kFileDeleteLimitForTest);
EXPECT_FALSE(base::IsDirectoryEmpty(dir_path));
// Delete another file, and now the directory is empty.
- ASSERT_EQ(DeleteDirectoryContent(dir_path, kFileDeleteLimitForTest), SUCCEED);
+ DeleteDirectoryContent(dir_path, kFileDeleteLimitForTest);
EXPECT_TRUE(base::IsDirectoryEmpty(dir_path));
EXPECT_TRUE(DirectoryExists(dir_path));
}
« no previous file with comments | « chrome/browser/win/jumplist_file_util.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698