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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 years, 4 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: third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
index ce3a4786f4213e583275f9834c483b4fd8f6cf97..bb76d560e0a5ab0a9e08d9c8a50623170c906dd2 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
@@ -35,8 +35,6 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "modules/indexeddb/IDBDatabase.h"
-#include "modules/indexeddb/IDBDatabaseCallbacks.h"
-#include "modules/indexeddb/MockWebIDBDatabase.h"
#include "platform/SharedBuffer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include <memory>
@@ -45,6 +43,7 @@
namespace blink {
namespace {
+#ifdef CJM_NEED_CALLBACK
void deactivateNewTransactions(v8::Isolate* isolate)
{
V8PerIsolateData::from(isolate)->runEndOfScopeTasks();
@@ -60,9 +59,11 @@ public:
private:
FakeIDBDatabaseCallbacks() { }
};
+#endif
TEST(IDBTransactionTest, EnsureLifetime)
{
+#ifdef CJM_NEED_CALLBACK
V8TestingScope scope;
std::unique_ptr<MockWebIDBDatabase> backend = MockWebIDBDatabase::create();
EXPECT_CALL(*backend, close())
@@ -92,10 +93,12 @@ TEST(IDBTransactionTest, EnsureLifetime)
ThreadHeap::collectAllGarbage();
EXPECT_EQ(0u, set.size());
+#endif
}
TEST(IDBTransactionTest, TransactionFinish)
{
+#ifdef CJM_NEED_CALLBACK
V8TestingScope scope;
const int64_t transactionId = 1234;
@@ -134,6 +137,7 @@ TEST(IDBTransactionTest, TransactionFinish)
// onAbort() should have cleared the transaction's reference to the database.
ThreadHeap::collectAllGarbage();
EXPECT_EQ(0u, set.size());
+#endif
}
} // namespace
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp ('k') | third_party/WebKit/Source/modules/indexeddb/IDBValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698