| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 6 |
| 7 #include "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
| 8 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h" | 8 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h" |
| 9 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 9 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 10 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" | 10 #include "content/browser/indexed_db/indexed_db_fake_backing_store.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void RunUntilIdle() { task_runner_->RunUntilIdle(); } | 98 void RunUntilIdle() { task_runner_->RunUntilIdle(); } |
| 99 RegistryTestMockFactory* factory() const { return factory_.get(); } | 99 RegistryTestMockFactory* factory() const { return factory_.get(); } |
| 100 MockIDBBackingStore* backing_store() const { return backing_store_.get(); } | 100 MockIDBBackingStore* backing_store() const { return backing_store_.get(); } |
| 101 IndexedDBActiveBlobRegistry* registry() const { return registry_.get(); } | 101 IndexedDBActiveBlobRegistry* registry() const { return registry_.get(); } |
| 102 | 102 |
| 103 static const int64 kDatabaseId0 = 7; | 103 static const int64 kDatabaseId0 = 7; |
| 104 static const int64 kDatabaseId1 = 12; | 104 static const int64 kDatabaseId1 = 12; |
| 105 static const int64 kBlobKey0 = 77; | 105 static const int64 kBlobKey0 = 77; |
| 106 static const int64 kBlobKey1 = 14; | 106 static const int64 kBlobKey1 = 14; |
| 107 | 107 |
| 108 typedef webkit_blob::ShareableFileReference::FinalReleaseCallback | 108 typedef storage::ShareableFileReference::FinalReleaseCallback ReleaseCallback; |
| 109 ReleaseCallback; | |
| 110 | 109 |
| 111 private: | 110 private: |
| 112 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; | 111 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; |
| 113 scoped_refptr<RegistryTestMockFactory> factory_; | 112 scoped_refptr<RegistryTestMockFactory> factory_; |
| 114 scoped_refptr<MockIDBBackingStore> backing_store_; | 113 scoped_refptr<MockIDBBackingStore> backing_store_; |
| 115 scoped_ptr<IndexedDBActiveBlobRegistry> registry_; | 114 scoped_ptr<IndexedDBActiveBlobRegistry> registry_; |
| 116 | 115 |
| 117 DISALLOW_COPY_AND_ASSIGN(IndexedDBActiveBlobRegistryTest); | 116 DISALLOW_COPY_AND_ASSIGN(IndexedDBActiveBlobRegistryTest); |
| 118 }; | 117 }; |
| 119 | 118 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 RunUntilIdle(); | 265 RunUntilIdle(); |
| 267 | 266 |
| 268 // Nothing changes. | 267 // Nothing changes. |
| 269 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin_url())); | 268 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin_url())); |
| 270 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty()); | 269 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty()); |
| 271 } | 270 } |
| 272 | 271 |
| 273 } // namespace | 272 } // namespace |
| 274 | 273 |
| 275 } // namespace content | 274 } // namespace content |
| OLD | NEW |