Chromium Code Reviews| Index: chrome/test/base/in_process_browser_test.cc |
| diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc |
| index 2f8ecb41cceec6221111e41daa8e8f111fcc8311..8cd7cbcf4299f754d2d7557c7a06998ed4280177 100644 |
| --- a/chrome/test/base/in_process_browser_test.cc |
| +++ b/chrome/test/base/in_process_browser_test.cc |
| @@ -22,6 +22,7 @@ |
| #include "build/build_config.h" |
| #include "chrome/browser/after_startup_task_utils.h" |
| #include "chrome/browser/browser_process.h" |
| +#include "chrome/browser/chrome_content_browser_client.h" |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/devtools/devtools_window.h" |
| #include "chrome/browser/lifetime/application_lifetime.h" |
| @@ -248,6 +249,12 @@ void InProcessBrowserTest::SetUp() { |
| google_util::SetMockLinkDoctorBaseURLForTesting(); |
| + // Use hardcoded quota settings to have a consistent testing environment. |
| + const int kQuota = 5 * 1024 * 1024; |
| + static storage::QuotaSettings g_quota_settings(kQuota * 5, kQuota, 0); |
|
sky
2016/12/13 01:52:54
Only use static if it can be a const_expr (see rec
|
| + ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| + &g_quota_settings); |
| + |
| BrowserTestBase::SetUp(); |
| } |
| @@ -357,6 +364,7 @@ void InProcessBrowserTest::TearDown() { |
| #endif |
| BrowserTestBase::TearDown(); |
| OSCryptMocker::TearDown(); |
| + ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(nullptr); |
| } |
| void InProcessBrowserTest::CloseBrowserSynchronously(Browser* browser) { |