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 #include <set> | 5 #include <set> |
6 #include <sstream> | 6 #include <sstream> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } // namespace | 49 } // namespace |
50 | 50 |
51 class QuotaManagerTest : public testing::Test { | 51 class QuotaManagerTest : public testing::Test { |
52 protected: | 52 protected: |
53 typedef QuotaManager::QuotaTableEntry QuotaTableEntry; | 53 typedef QuotaManager::QuotaTableEntry QuotaTableEntry; |
54 typedef QuotaManager::QuotaTableEntries QuotaTableEntries; | 54 typedef QuotaManager::QuotaTableEntries QuotaTableEntries; |
55 typedef QuotaManager::OriginInfoTableEntries OriginInfoTableEntries; | 55 typedef QuotaManager::OriginInfoTableEntries OriginInfoTableEntries; |
56 | 56 |
57 public: | 57 public: |
58 QuotaManagerTest() | 58 QuotaManagerTest() |
59 : weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 59 : weak_factory_(this), |
60 mock_time_counter_(0) { | 60 mock_time_counter_(0) { |
61 } | 61 } |
62 | 62 |
63 virtual void SetUp() { | 63 virtual void SetUp() { |
64 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 64 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
65 mock_special_storage_policy_ = new MockSpecialStoragePolicy; | 65 mock_special_storage_policy_ = new MockSpecialStoragePolicy; |
66 quota_manager_ = new QuotaManager( | 66 quota_manager_ = new QuotaManager( |
67 false /* is_incognito */, | 67 false /* is_incognito */, |
68 data_dir_.path(), | 68 data_dir_.path(), |
69 MessageLoopProxy::current(), | 69 MessageLoopProxy::current(), |
(...skipping 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2133 | 2133 |
2134 DeleteHostData("foo.com", kTemp, | 2134 DeleteHostData("foo.com", kTemp, |
2135 QuotaClient::kDatabase | QuotaClient::kIndexedDatabase); | 2135 QuotaClient::kDatabase | QuotaClient::kIndexedDatabase); |
2136 MessageLoop::current()->RunUntilIdle(); | 2136 MessageLoop::current()->RunUntilIdle(); |
2137 GetHostUsage("foo.com", kTemp); | 2137 GetHostUsage("foo.com", kTemp); |
2138 MessageLoop::current()->RunUntilIdle(); | 2138 MessageLoop::current()->RunUntilIdle(); |
2139 EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage()); | 2139 EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage()); |
2140 } | 2140 } |
2141 | 2141 |
2142 } // namespace quota | 2142 } // namespace quota |
OLD | NEW |