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

Unified Diff: content/browser/indexed_db/leveldb/mock_leveldb_factory.h

Issue 356463008: Cleanup IndexedDBIO unit tests using GoogleMock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not exporting MockLevelDBFactory 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/leveldb/mock_leveldb_factory.h
diff --git a/content/browser/indexed_db/leveldb/mock_leveldb_factory.h b/content/browser/indexed_db/leveldb/mock_leveldb_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..dacb86081d07101912ee9832c487feaaad7ca9a4
--- /dev/null
+++ b/content/browser/indexed_db/leveldb/mock_leveldb_factory.h
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_MOCK_LEVELDB_FACTORY_H_
+#define CONTENT_BROWSER_INDEXED_DB_LEVELDB_MOCK_LEVELDB_FACTORY_H_
+
+#include "base/files/file_path.h"
+#include "content/browser/indexed_db/leveldb/leveldb_factory.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace content {
+
+class MockLevelDBFactory : public LevelDBFactory {
+ public:
+ MockLevelDBFactory();
+ ~MockLevelDBFactory();
+ MOCK_METHOD4(OpenLevelDB,
+ leveldb::Status(const base::FilePath& file_name,
+ const LevelDBComparator* comparator,
+ scoped_ptr<LevelDBDatabase>* db,
+ bool* is_disk_full));
+ MOCK_METHOD1(DestroyLevelDB,
+ leveldb::Status(const base::FilePath& file_name));
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_LEVELDB_MOCK_LEVELDB_FACTORY_H_
« no previous file with comments | « content/browser/indexed_db/leveldb/leveldb_factory.h ('k') | content/browser/indexed_db/leveldb/mock_leveldb_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698