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

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: 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..1bb7b9688e9953ab0d3c650045644d8a8bd8d0ea 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -44,6 +44,17 @@ TEST_F(SysInfoTest, AmountOfFreeDiskSpace) {
<< 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 = 0;
+ int64_t total = 0;
+ EXPECT_TRUE(base::SysInfo::GetDiskSpaceInfo(tmp_path, &available, &total));
+ EXPECT_GT(available, 0) << tmp_path.value();
Dan Beam 2016/06/09 17:20:13 what if the disk is full? do we want to handle th
fukino 2016/06/10 01:33:36 I updated it to _GE, and I changed the initial val
+ 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