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

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

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Store IOThreadHelper in an unique_ptr and add a TestBrowserThreadBundle where needed. 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_database_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index e558e7bc1110132041f185f40239a3e25a79d7f2..4b01dd8b0388abe22ff2d30094a37ea42dc78e05 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -27,6 +27,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/indexed_db/mock_indexed_db_factory.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::ASCIIToUTF16;
@@ -57,6 +58,7 @@ TEST(IndexedDBDatabaseTest, BackingStoreRetention) {
}
TEST(IndexedDBDatabaseTest, ConnectionLifecycle) {
+ content::TestBrowserThreadBundle thread_bundle;
scoped_refptr<IndexedDBFakeBackingStore> backing_store =
new IndexedDBFakeBackingStore();
EXPECT_TRUE(backing_store->HasOneRef()); // local
@@ -111,6 +113,7 @@ TEST(IndexedDBDatabaseTest, ConnectionLifecycle) {
}
TEST(IndexedDBDatabaseTest, ForcedClose) {
+ content::TestBrowserThreadBundle thread_bundle;
dcheng 2016/10/19 23:44:02 Not necessary in this CL, but having a test fixtur
scoped_refptr<IndexedDBFakeBackingStore> backing_store =
new IndexedDBFakeBackingStore();
EXPECT_TRUE(backing_store->HasOneRef());
@@ -178,6 +181,7 @@ class MockCallbacks : public IndexedDBCallbacks {
};
TEST(IndexedDBDatabaseTest, PendingDelete) {
+ content::TestBrowserThreadBundle thread_bundle;
scoped_refptr<IndexedDBFakeBackingStore> backing_store =
new IndexedDBFakeBackingStore();
EXPECT_TRUE(backing_store->HasOneRef()); // local
@@ -234,6 +238,7 @@ TEST(IndexedDBDatabaseTest, PendingDelete) {
}
TEST(IndexedDBDatabaseTest, ConnectionRequestsNoLongerValid) {
+ content::TestBrowserThreadBundle thread_bundle;
scoped_refptr<IndexedDBFakeBackingStore> backing_store =
new IndexedDBFakeBackingStore();
@@ -390,8 +395,8 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
leveldb::Status commit_success_;
private:
- base::MessageLoop message_loop_;
scoped_refptr<MockIndexedDBFactory> factory_;
+ content::TestBrowserThreadBundle thread_bundle_;
DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseOperationTest);
};

Powered by Google App Engine
This is Rietveld 408576698