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

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

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Address last nits and fix leaks in unit tests. Created 4 years, 2 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_factory_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc
index 6d7a0a33e4e6f84a0defe006f42c994a5f60bc3d..005b40c366695935e6ee1c95211c86eab88a5cc7 100644
--- a/content/browser/indexed_db/indexed_db_factory_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc
@@ -9,7 +9,6 @@
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_simple_task_runner.h"
@@ -19,6 +18,7 @@
#include "content/browser/indexed_db/mock_indexed_db_callbacks.h"
#include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h"
#include "content/browser/quota/mock_quota_manager_proxy.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseException.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
@@ -81,9 +81,6 @@ class IndexedDBFactoryTest : public testing::Test {
}
protected:
- // For timers to post events.
- base::MessageLoop loop_;
-
MockIDBFactory* factory() const { return idb_factory_.get(); }
void clear_factory() { idb_factory_ = nullptr; }
IndexedDBContextImpl* context() const { return context_.get(); }
@@ -93,6 +90,8 @@ class IndexedDBFactoryTest : public testing::Test {
scoped_refptr<IndexedDBContextImpl> context_;
scoped_refptr<MockIDBFactory> idb_factory_;
scoped_refptr<MockQuotaManagerProxy> quota_manager_proxy_;
+ TestBrowserThreadBundle thread_bundle_;
+
DISALLOW_COPY_AND_ASSIGN(IndexedDBFactoryTest);
};
@@ -251,7 +250,7 @@ TEST_F(IndexedDBFactoryTest, QuotaErrorOnDiskFull) {
scoped_refptr<LookingForQuotaErrorMockCallbacks> callbacks =
new LookingForQuotaErrorMockCallbacks;
scoped_refptr<IndexedDBDatabaseCallbacks> dummy_database_callbacks =
- new IndexedDBDatabaseCallbacks(nullptr, 0, 0);
+ new IndexedDBDatabaseCallbacks(nullptr, 0, nullptr);
const base::string16 name(ASCIIToUTF16("name"));
std::unique_ptr<IndexedDBPendingConnection> connection(
base::MakeUnique<IndexedDBPendingConnection>(
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_index_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698