Index: content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc |
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc |
index a0e12dc6d0f91a8cb10559e1ff8caeecd8c52410..063f2ed9b0ca7e6bd327a9bfe66da76a2a05c21b 100644 |
--- a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc |
+++ b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc |
@@ -7,17 +7,17 @@ |
#include "base/test/test_simple_task_runner.h" |
#include "content/browser/indexed_db/indexed_db_active_blob_registry.h" |
#include "content/browser/indexed_db/indexed_db_backing_store.h" |
-#include "content/browser/indexed_db/indexed_db_factory_impl.h" |
#include "content/browser/indexed_db/indexed_db_fake_backing_store.h" |
+#include "content/browser/indexed_db/mock_indexed_db_factory.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace content { |
namespace { |
-class MockIDBFactory : public IndexedDBFactoryImpl { |
+class RegistryTestMockFactory : public MockIndexedDBFactory { |
public: |
- MockIDBFactory() : IndexedDBFactoryImpl(NULL), duplicate_calls_(false) {} |
+ RegistryTestMockFactory() : duplicate_calls_(false) {} |
virtual void ReportOutstandingBlobs(const GURL& origin_url, |
bool blobs_outstanding) OVERRIDE { |
@@ -39,18 +39,18 @@ class MockIDBFactory : public IndexedDBFactoryImpl { |
bool CheckNoOriginsInUse() const { |
return !duplicate_calls_ && !origins_.size(); |
} |
+ |
bool CheckSingleOriginInUse(const GURL& origin) const { |
return !duplicate_calls_ && origins_.size() == 1 && origins_.count(origin); |
} |
- protected: |
- virtual ~MockIDBFactory() {} |
- |
private: |
+ virtual ~RegistryTestMockFactory() {} |
+ |
std::set<GURL> origins_; |
bool duplicate_calls_; |
- DISALLOW_COPY_AND_ASSIGN(MockIDBFactory); |
+ DISALLOW_COPY_AND_ASSIGN(RegistryTestMockFactory); |
}; |
class MockIDBBackingStore : public IndexedDBFakeBackingStore { |
@@ -91,12 +91,12 @@ class IndexedDBActiveBlobRegistryTest : public testing::Test { |
public: |
IndexedDBActiveBlobRegistryTest() |
: task_runner_(new base::TestSimpleTaskRunner), |
- factory_(new MockIDBFactory), |
+ factory_(new RegistryTestMockFactory), |
backing_store_(new MockIDBBackingStore(factory_, task_runner_)), |
registry_(new IndexedDBActiveBlobRegistry(backing_store_.get())) {} |
void RunUntilIdle() { task_runner_->RunUntilIdle(); } |
- MockIDBFactory* factory() const { return factory_.get(); } |
+ RegistryTestMockFactory* factory() const { return factory_.get(); } |
MockIDBBackingStore* backing_store() const { return backing_store_.get(); } |
IndexedDBActiveBlobRegistry* registry() const { return registry_.get(); } |
@@ -110,7 +110,7 @@ class IndexedDBActiveBlobRegistryTest : public testing::Test { |
private: |
scoped_refptr<base::TestSimpleTaskRunner> task_runner_; |
- scoped_refptr<MockIDBFactory> factory_; |
+ scoped_refptr<RegistryTestMockFactory> factory_; |
scoped_refptr<MockIDBBackingStore> backing_store_; |
scoped_ptr<IndexedDBActiveBlobRegistry> registry_; |