| Index: webkit/quota/quota_manager_unittest.cc
|
| diff --git a/webkit/quota/quota_manager_unittest.cc b/webkit/quota/quota_manager_unittest.cc
|
| index 54f74ddaff8469a07a45c471a5badc8e0bc045d0..cd13b74c363aad60a472c73429c8f9f8bf348adc 100644
|
| --- a/webkit/quota/quota_manager_unittest.cc
|
| +++ b/webkit/quota/quota_manager_unittest.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -31,6 +31,8 @@ namespace quota {
|
| const StorageType kTemp = kStorageTypeTemporary;
|
| const StorageType kPerm = kStorageTypePersistent;
|
|
|
| +const int kAllClients = QuotaClient::kAllClientsMask;
|
| +
|
| class QuotaManagerTest : public testing::Test {
|
| protected:
|
| typedef QuotaManager::QuotaTableEntry QuotaTableEntry;
|
| @@ -178,19 +180,21 @@ class QuotaManagerTest : public testing::Test {
|
| }
|
|
|
| void DeleteOriginData(const GURL& origin,
|
| - StorageType type) {
|
| + StorageType type,
|
| + int quota_client_mask) {
|
| quota_status_ = kQuotaStatusUnknown;
|
| quota_manager_->DeleteOriginData(
|
| - origin, type,
|
| + origin, type, quota_client_mask,
|
| base::Bind(&QuotaManagerTest::StatusCallback,
|
| weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| void DeleteHostData(const std::string& host,
|
| - StorageType type) {
|
| + StorageType type,
|
| + int quota_client_mask) {
|
| quota_status_ = kQuotaStatusUnknown;
|
| quota_manager_->DeleteHostData(
|
| - host, type,
|
| + host, type, quota_client_mask,
|
| base::Bind(&QuotaManagerTest::StatusCallback,
|
| weak_factory_.GetWeakPtr()));
|
| }
|
| @@ -724,8 +728,8 @@ TEST_F(QuotaManagerTest, GetTemporaryUsageAndQuota_NukeManager) {
|
| RunAdditionalUsageAndQuotaTask(GURL("http://bar.com/"),
|
| kTemp);
|
|
|
| - DeleteOriginData(GURL("http://foo.com/"), kTemp);
|
| - DeleteOriginData(GURL("http://bar.com/"), kTemp);
|
| + DeleteOriginData(GURL("http://foo.com/"), kTemp, kAllClients);
|
| + DeleteOriginData(GURL("http://bar.com/"), kTemp, kAllClients);
|
|
|
| // Nuke before waiting for callbacks.
|
| set_quota_manager(NULL);
|
| @@ -1319,7 +1323,7 @@ TEST_F(QuotaManagerTest, DeleteHostDataSimple) {
|
| MessageLoop::current()->RunAllPending();
|
| int64 predelete_host_pers = usage();
|
|
|
| - DeleteHostData("", kTemp);
|
| + DeleteHostData("", kTemp, kAllClients);
|
| MessageLoop::current()->RunAllPending();
|
| EXPECT_EQ(kQuotaStatusOk, status());
|
|
|
| @@ -1335,7 +1339,7 @@ TEST_F(QuotaManagerTest, DeleteHostDataSimple) {
|
| MessageLoop::current()->RunAllPending();
|
| EXPECT_EQ(predelete_host_pers, usage());
|
|
|
| - DeleteHostData("foo.com", kTemp);
|
| + DeleteHostData("foo.com", kTemp, kAllClients);
|
| MessageLoop::current()->RunAllPending();
|
| EXPECT_EQ(kQuotaStatusOk, status());
|
|
|
| @@ -1392,9 +1396,9 @@ TEST_F(QuotaManagerTest, DeleteHostDataMultiple) {
|
| const int64 predelete_bar_pers = usage();
|
|
|
| reset_status_callback_count();
|
| - DeleteHostData("foo.com", kTemp);
|
| - DeleteHostData("bar.com", kTemp);
|
| - DeleteHostData("foo.com", kTemp);
|
| + DeleteHostData("foo.com", kTemp, kAllClients);
|
| + DeleteHostData("bar.com", kTemp, kAllClients);
|
| + DeleteHostData("foo.com", kTemp, kAllClients);
|
| MessageLoop::current()->RunAllPending();
|
|
|
| EXPECT_EQ(3, status_callback_count());
|
| @@ -1486,9 +1490,9 @@ TEST_F(QuotaManagerTest, DeleteOriginDataMultiple) {
|
| MessageLoop::current()->RunAllPending();
|
|
|
| reset_status_callback_count();
|
| - DeleteOriginData(GURL("http://foo.com/"), kTemp);
|
| - DeleteOriginData(GURL("http://bar.com/"), kTemp);
|
| - DeleteOriginData(GURL("http://foo.com/"), kTemp);
|
| + DeleteOriginData(GURL("http://foo.com/"), kTemp, kAllClients);
|
| + DeleteOriginData(GURL("http://bar.com/"), kTemp, kAllClients);
|
| + DeleteOriginData(GURL("http://foo.com/"), kTemp, kAllClients);
|
| MessageLoop::current()->RunAllPending();
|
|
|
| EXPECT_EQ(3, status_callback_count());
|
|
|