Index: content/browser/fileapi/file_system_browsertest.cc |
diff --git a/content/browser/fileapi/file_system_browsertest.cc b/content/browser/fileapi/file_system_browsertest.cc |
index fc2e8ddfd6dca9862147230a24d049f2adcf7f63..914033b9ac14c18b9f1b1ff7a329acd515240c48 100644 |
--- a/content/browser/fileapi/file_system_browsertest.cc |
+++ b/content/browser/fileapi/file_system_browsertest.cc |
@@ -55,29 +55,28 @@ class FileSystemBrowserTest : public ContentBrowserTest { |
class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest { |
public: |
void SetUpOnMainThread() override { |
- const int kInitialQuotaKilobytes = 5000; |
- const int kTemporaryStorageQuotaMaxSize = |
- kInitialQuotaKilobytes * 1024 * QuotaManager::kPerHostTemporaryPortion; |
- SetTempQuota( |
- kTemporaryStorageQuotaMaxSize, |
+ SetLowQuota( |
BrowserContext::GetDefaultStoragePartition( |
shell()->web_contents()->GetBrowserContext())->GetQuotaManager()); |
} |
- static void SetTempQuota(int64_t bytes, scoped_refptr<QuotaManager> qm) { |
+ static void SetLowQuota(scoped_refptr<QuotaManager> qm) { |
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
- base::Bind(&FileSystemBrowserTestWithLowQuota::SetTempQuota, bytes, |
+ base::Bind(&FileSystemBrowserTestWithLowQuota::SetLowQuota, |
qm)); |
return; |
} |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
- qm->SetTemporaryGlobalOverrideQuota(bytes, storage::QuotaCallback()); |
- // Don't return until the quota has been set. |
- scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( |
- BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get())); |
- ASSERT_TRUE(helper->Run()); |
+ // These sizes must correspond with expectations in html and js. |
+ const int kMeg = 1000 * 1024; |
+ storage::TemporaryStorageConfiguration config; |
+ config.pool_size = 25 * kMeg; |
+ config.per_host_quota = 5 * kMeg; |
+ config.must_remain_available = 100 * kMeg;; |
+ config.refresh_interval = base::TimeDelta::Max(); |
+ qm->SetTemporaryStorageConfiguration(config); |
} |
}; |