Index: chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc |
diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc |
index 1ee219968310f9205bb93602175e905304eae483..fa338e11b045f4f133ccc5baa7d0af60545fca5a 100644 |
--- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc |
+++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc |
@@ -18,6 +18,7 @@ |
#include "chrome/browser/sync_file_system/sync_status_code.h" |
#include "chrome/browser/sync_file_system/syncable_file_system_util.h" |
#include "chrome/test/base/test_switches.h" |
+#include "content/public/browser/storage_partition.h" |
#include "extensions/browser/extension_function.h" |
#include "storage/browser/fileapi/file_system_url.h" |
#include "storage/browser/quota/quota_manager.h" |
@@ -46,10 +47,6 @@ class SyncFileSystemApiTest : public ExtensionApiTest { |
void SetUpInProcessBrowserTestFixture() override { |
ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
- real_minimum_preserved_space_ = |
- storage::QuotaManager::kMinimumPreserveForSystem; |
- storage::QuotaManager::kMinimumPreserveForSystem = 0; |
- |
// TODO(calvinlo): Update test code after default quota is made const |
// (http://crbug.com/155488). |
real_default_quota_ = |
@@ -58,8 +55,6 @@ class SyncFileSystemApiTest : public ExtensionApiTest { |
} |
void TearDownInProcessBrowserTestFixture() override { |
- storage::QuotaManager::kMinimumPreserveForSystem = |
- real_minimum_preserved_space_; |
storage::QuotaManager::kSyncableStorageDefaultHostQuota = |
real_default_quota_; |
ExtensionApiTest::TearDownInProcessBrowserTestFixture(); |
@@ -73,6 +68,16 @@ class SyncFileSystemApiTest : public ExtensionApiTest { |
SyncFileSystemServiceFactory::GetInstance()->set_mock_remote_file_service( |
std::unique_ptr<RemoteFileSyncService>(mock_remote_service_)); |
ExtensionApiTest::SetUpOnMainThread(); |
+ |
+ content::BrowserContext* context = browser()->profile(); |
+ const int kMeg = 1000 * 1024; |
cmumford
2016/10/25 20:30:54
I can see 1024*1024, or 1000*1000, but why 1000*10
michaeln
2016/10/26 21:47:53
Done.
|
+ storage::TemporaryStorageConfiguration config; |
+ config.pool_size = 25 * kMeg; |
+ config.per_host_quota = 5 * kMeg; |
+ config.must_remain_available = 0; |
+ config.refresh_interval = base::TimeDelta::Max(); |
+ content::BrowserContext::GetDefaultStoragePartition(context)-> |
+ GetQuotaManager()->SetTemporaryStorageConfiguration(config); |
} |
::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() { |