Chromium Code Reviews| 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; |