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

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

Issue 18221003: Convert WebIDBDatabaseImpl to IndexedDBConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 6 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_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index c0904e59b6a6faee9f9d661e38157a923ad0c687..863be90ed5b4db889780c92e7442a6a3d169fdfd 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -7,8 +7,8 @@
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread.h"
#include "content/browser/browser_thread_impl.h"
+#include "content/browser/indexed_db/indexed_db_connection.h"
#include "content/browser/indexed_db/indexed_db_context_impl.h"
-#include "content/browser/indexed_db/webidbdatabase_impl.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/test_browser_context.h"
@@ -37,9 +37,7 @@ class IndexedDBTest : public testing::Test {
}
protected:
- void FlushIndexedDBTaskRunner() {
- task_runner_->RunUntilIdle();
- }
+ void FlushIndexedDBTaskRunner() { task_runner_->RunUntilIdle(); }
base::MessageLoop message_loop_;
scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
@@ -120,18 +118,18 @@ TEST_F(IndexedDBTest, SetForceKeepSessionState) {
EXPECT_TRUE(file_util::DirectoryExists(session_only_path));
}
-class MockWebIDBDatabase : public WebIDBDatabaseImpl {
+class MockConnection : public IndexedDBConnection {
public:
- explicit MockWebIDBDatabase(bool expect_force_close)
- : WebIDBDatabaseImpl(NULL, NULL),
+ explicit MockConnection(bool expect_force_close)
+ : IndexedDBConnection(NULL, NULL),
expect_force_close_(expect_force_close),
force_close_called_(false) {}
- virtual ~MockWebIDBDatabase() {
+ virtual ~MockConnection() {
EXPECT_TRUE(force_close_called_ == expect_force_close_);
}
- virtual void forceClose() OVERRIDE {
+ virtual void ForceClose() OVERRIDE {
ASSERT_TRUE(expect_force_close_);
force_close_called_ = true;
}
@@ -165,7 +163,7 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) {
const bool kExpectForceClose = true;
- MockWebIDBDatabase connection1(kExpectForceClose);
+ MockConnection connection1(kExpectForceClose);
idb_context->TaskRunner()->PostTask(
FROM_HERE,
base::Bind(&IndexedDBContextImpl::ConnectionOpened,
@@ -173,7 +171,7 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) {
kTestOrigin,
&connection1));
- MockWebIDBDatabase connection2(!kExpectForceClose);
+ MockConnection connection2(!kExpectForceClose);
idb_context->TaskRunner()->PostTask(
FROM_HERE,
base::Bind(&IndexedDBContextImpl::ConnectionOpened,
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/webidbdatabase_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698