| OLD | NEW |
| 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 | 5 |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 const std::set<GURL>& origins() const { | 92 const std::set<GURL>& origins() const { |
| 93 return origins_; | 93 return origins_; |
| 94 } | 94 } |
| 95 | 95 |
| 96 const StorageType& type() const { | 96 const StorageType& type() const { |
| 97 return type_; | 97 return type_; |
| 98 } | 98 } |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 MessageLoop message_loop_; |
| 101 ScopedTempDir data_dir_; | 102 ScopedTempDir data_dir_; |
| 102 base::WeakPtrFactory<MockQuotaManagerTest> weak_factory_; | 103 base::WeakPtrFactory<MockQuotaManagerTest> weak_factory_; |
| 103 scoped_refptr<MockQuotaManager> manager_; | 104 scoped_refptr<MockQuotaManager> manager_; |
| 104 scoped_refptr<MockSpecialStoragePolicy> policy_; | 105 scoped_refptr<MockSpecialStoragePolicy> policy_; |
| 105 | 106 |
| 106 int deletion_callback_count_; | 107 int deletion_callback_count_; |
| 107 | 108 |
| 108 std::set<GURL> origins_; | 109 std::set<GURL> origins_; |
| 109 StorageType type_; | 110 StorageType type_; |
| 110 | 111 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 214 |
| 214 GetModifiedOrigins(kTemporary, now - a_minute); | 215 GetModifiedOrigins(kTemporary, now - a_minute); |
| 215 MessageLoop::current()->RunAllPending(); | 216 MessageLoop::current()->RunAllPending(); |
| 216 | 217 |
| 217 EXPECT_EQ(kTemporary, type()); | 218 EXPECT_EQ(kTemporary, type()); |
| 218 EXPECT_EQ(1UL, origins().size()); | 219 EXPECT_EQ(1UL, origins().size()); |
| 219 EXPECT_EQ(0UL, origins().count(kOrigin1)); | 220 EXPECT_EQ(0UL, origins().count(kOrigin1)); |
| 220 EXPECT_EQ(1UL, origins().count(kOrigin2)); | 221 EXPECT_EQ(1UL, origins().count(kOrigin2)); |
| 221 } | 222 } |
| 222 } // Namespace quota | 223 } // Namespace quota |
| OLD | NEW |