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

Unified Diff: base/sys_info_unittest.cc

Issue 2052663003: Move implementation of QuotaManager.getVolumeInfo to base::SysInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 6 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
Index: base/sys_info_unittest.cc
diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc
index 3f284ba86840b802dc4171aedfd3b089a0b90fcc..63a125f1c143357f56d61bc689dcf744d5baa3b3 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -40,10 +40,21 @@ TEST_F(SysInfoTest, AmountOfFreeDiskSpace) {
// We aren't actually testing that it's correct, just that it's sane.
FilePath tmp_path;
ASSERT_TRUE(base::GetTempDir(&tmp_path));
- EXPECT_GT(base::SysInfo::AmountOfFreeDiskSpace(tmp_path), 0)
+ EXPECT_GE(base::SysInfo::AmountOfFreeDiskSpace(tmp_path), 0)
<< tmp_path.value();
}
+TEST_F(SysInfoTest, GetDiskSpaceInfo) {
+ // We aren't actually testing that it's correct, just that it's sane.
+ FilePath tmp_path;
+ ASSERT_TRUE(base::GetTempDir(&tmp_path));
+ int64_t available = -1;
+ int64_t total = -1;
+ EXPECT_TRUE(base::SysInfo::GetDiskSpaceInfo(tmp_path, &available, &total));
+ EXPECT_GE(available, 0) << tmp_path.value();
+ EXPECT_GT(total, 0) << tmp_path.value();
+}
+
#if defined(OS_WIN) || defined(OS_MACOSX)
TEST_F(SysInfoTest, OperatingSystemVersionNumbers) {
int32_t os_major_version = -1;

Powered by Google App Engine
This is Rietveld 408576698