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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc

Issue 2592793002: Revert of Change how the quota system computes the total poolsize for temporary storage (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 19 matching lines...) Expand all
30 30
31 BrowsingDataQuotaHelperTest() : weak_factory_(this) {} 31 BrowsingDataQuotaHelperTest() : weak_factory_(this) {}
32 32
33 ~BrowsingDataQuotaHelperTest() override {} 33 ~BrowsingDataQuotaHelperTest() override {}
34 34
35 void SetUp() override { 35 void SetUp() override {
36 EXPECT_TRUE(dir_.CreateUniqueTempDir()); 36 EXPECT_TRUE(dir_.CreateUniqueTempDir());
37 quota_manager_ = new storage::QuotaManager( 37 quota_manager_ = new storage::QuotaManager(
38 false, dir_.GetPath(), 38 false, dir_.GetPath(),
39 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), 39 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(),
40 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(), nullptr, 40 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB).get(),
41 storage::GetQuotaSettingsFunc()); 41 nullptr);
42 helper_ = new BrowsingDataQuotaHelperImpl(quota_manager_.get()); 42 helper_ = new BrowsingDataQuotaHelperImpl(quota_manager_.get());
43 } 43 }
44 44
45 void TearDown() override { 45 void TearDown() override {
46 helper_ = nullptr; 46 helper_ = nullptr;
47 quota_manager_ = nullptr; 47 quota_manager_ = nullptr;
48 quota_info_.clear(); 48 quota_info_.clear();
49 base::RunLoop().RunUntilIdle(); 49 base::RunLoop().RunUntilIdle();
50 } 50 }
51 51
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 base::RunLoop().RunUntilIdle(); 191 base::RunLoop().RunUntilIdle();
192 192
193 GetPersistentHostQuota(kHost1); 193 GetPersistentHostQuota(kHost1);
194 base::RunLoop().RunUntilIdle(); 194 base::RunLoop().RunUntilIdle();
195 EXPECT_EQ(0, quota()); 195 EXPECT_EQ(0, quota());
196 196
197 GetPersistentHostQuota(kHost2); 197 GetPersistentHostQuota(kHost2);
198 base::RunLoop().RunUntilIdle(); 198 base::RunLoop().RunUntilIdle();
199 EXPECT_EQ(10, quota()); 199 EXPECT_EQ(10, quota());
200 } 200 }
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698