Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Unified Diff: content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc

Issue 308103004: IndexedDB: Using a mock IndexedDBFactory for unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor cleanup to resync with ToT Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b3276be268d39e55e83751d3d4e78907fab5691f 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 MockIDBFactory : public MockIndexedDBFactory {
jsbell 2014/07/28 22:26:15 Can we rename this class to something that disting
cmumford 2014/07/28 22:46:35 Done.
public:
- MockIDBFactory() : IndexedDBFactoryImpl(NULL), duplicate_calls_(false) {}
+ MockIDBFactory() : duplicate_calls_(false) {}
virtual void ReportOutstandingBlobs(const GURL& origin_url,
bool blobs_outstanding) OVERRIDE {
@@ -39,14 +39,14 @@ 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:
+ private:
virtual ~MockIDBFactory() {}
- private:
std::set<GURL> origins_;
bool duplicate_calls_;
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_database.cc » ('j') | content/browser/indexed_db/mock_indexed_db_factory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698