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

Unified Diff: content/browser/quota/quota_manager_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: content/browser/quota/quota_manager_unittest.cc
diff --git a/content/browser/quota/quota_manager_unittest.cc b/content/browser/quota/quota_manager_unittest.cc
index 685b2d6be93333f1a1a43396d8653d9705eb56af..f2a93ff4c47db4c4133f126192cf2c5a39c19d36 100644
--- a/content/browser/quota/quota_manager_unittest.cc
+++ b/content/browser/quota/quota_manager_unittest.cc
@@ -73,8 +73,8 @@ int64_t GetAvailableDiskSpaceForTest() {
}
bool GetVolumeInfoForTests(const base::FilePath&,
- uint64_t* available, uint64_t* total) {
- *available = static_cast<uint64_t>(GetAvailableDiskSpaceForTest());
+ int64_t* available, int64_t* total) {
+ *available = GetAvailableDiskSpaceForTest();
*total = *available * 2;
return true;
}
@@ -297,12 +297,6 @@ class QuotaManagerTest : public testing::Test {
quota_manager_->GetCachedOrigins(type, origins);
}
- bool GetVolumeInfo(const base::FilePath& path,
- uint64_t* available_space,
- uint64_t* total_size) {
- return QuotaManager::GetVolumeInfo(path, available_space, total_size);
- }
-
void NotifyStorageAccessed(QuotaClient* client,
const GURL& origin,
StorageType type) {
@@ -2297,15 +2291,4 @@ TEST_F(QuotaManagerTest, GetUsageAndQuota_Incognito) {
EXPECT_EQ(QuotaManager::kIncognitoDefaultQuotaLimit, quota());
}
-TEST_F(QuotaManagerTest, GetVolumeInfo) {
- // We aren't actually testing that it's correct, just that it's sane.
- base::FilePath tmp_dir;
- ASSERT_TRUE(base::GetTempDir(&tmp_dir));
- uint64_t available_space = 0;
- uint64_t total_size = 0;
- EXPECT_TRUE(GetVolumeInfo(tmp_dir, &available_space, &total_size));
- EXPECT_GT(available_space, 0u) << tmp_dir.value();
- EXPECT_GT(total_size, 0u) << tmp_dir.value();
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698