| 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..5e80157a9c94a91d683b8a88549c3fc325121648 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"
|
| @@ -40,16 +41,11 @@ class SyncFileSystemApiTest : public ExtensionApiTest {
|
| public:
|
| SyncFileSystemApiTest()
|
| : mock_remote_service_(NULL),
|
| - real_minimum_preserved_space_(0),
|
| real_default_quota_(0) {}
|
|
|
| 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 +54,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 +67,17 @@ 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 = 1024 * 1024;
|
| + storage::QuotaSettings settings;
|
| + settings.pool_size = 25 * kMeg;
|
| + settings.per_host_quota = 5 * kMeg;
|
| + settings.must_remain_available = 0;
|
| + settings.refresh_interval = base::TimeDelta::Max();
|
| + content::BrowserContext::GetDefaultStoragePartition(context)
|
| + ->GetQuotaManager()
|
| + ->SetQuotaSettings(settings);
|
| }
|
|
|
| ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() {
|
| @@ -81,7 +86,6 @@ class SyncFileSystemApiTest : public ExtensionApiTest {
|
|
|
| private:
|
| ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service_;
|
| - int64_t real_minimum_preserved_space_;
|
| int64_t real_default_quota_;
|
| };
|
|
|
|
|