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

Unified Diff: webrtc/base/fileutils_unittest.cc

Issue 2699143002: Delete unused Filesystem methods GetAppDataFolder and GetDiskFreeSpace. (Closed)
Patch Set: Created 3 years, 10 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 | « webrtc/base/fileutils.h ('k') | webrtc/base/unixfilesystem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/fileutils_unittest.cc
diff --git a/webrtc/base/fileutils_unittest.cc b/webrtc/base/fileutils_unittest.cc
index e9999040f21b352366daf534cc77069aaf7a376b..068d60e3ac4940d6b91d48bc1e46572e1397c657 100644
--- a/webrtc/base/fileutils_unittest.cc
+++ b/webrtc/base/fileutils_unittest.cc
@@ -70,37 +70,4 @@ TEST(MAYBE_FilesystemTest, TestOpenBadFile) {
EXPECT_FALSE(fs != NULL);
}
-// Test checking for free disk space.
-TEST(MAYBE_FilesystemTest, TestGetDiskFreeSpace) {
- // Note that we should avoid picking any file/folder which could be located
- // at the remotely mounted drive/device.
- Pathname path;
- ASSERT_TRUE(Filesystem::GetAppDataFolder(&path, true));
-
- int64_t free1 = 0;
- EXPECT_TRUE(Filesystem::IsFolder(path));
- EXPECT_FALSE(Filesystem::IsFile(path));
- EXPECT_TRUE(Filesystem::GetDiskFreeSpace(path, &free1));
- EXPECT_GT(free1, 0);
-
- int64_t free2 = 0;
- path.AppendFolder("this_folder_doesnt_exist");
- EXPECT_FALSE(Filesystem::IsFolder(path));
- EXPECT_TRUE(Filesystem::IsAbsent(path));
- EXPECT_TRUE(Filesystem::GetDiskFreeSpace(path, &free2));
- // These should be the same disk, and disk free space should not have changed
- // by more than 1% between the two calls.
- EXPECT_LT(static_cast<int64_t>(free1 * .9), free2);
- EXPECT_LT(free2, static_cast<int64_t>(free1 * 1.1));
-
- int64_t free3 = 0;
- path.clear();
- EXPECT_TRUE(path.empty());
- EXPECT_TRUE(Filesystem::GetDiskFreeSpace(path, &free3));
- // Current working directory may not be where exe is.
- // EXPECT_LT(static_cast<int64_t>(free1 * .9), free3);
- // EXPECT_LT(free3, static_cast<int64_t>(free1 * 1.1));
- EXPECT_GT(free3, 0);
-}
-
} // namespace rtc
« no previous file with comments | « webrtc/base/fileutils.h ('k') | webrtc/base/unixfilesystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698