| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "core/dom/DOMError.h" | 34 #include "core/dom/DOMError.h" |
| 35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
| 36 #include "modules/indexeddb/IDBDatabase.h" | 36 #include "modules/indexeddb/IDBDatabase.h" |
| 37 #include "modules/indexeddb/IDBDatabaseCallbacks.h" | 37 #include "modules/indexeddb/IDBDatabaseCallbacks.h" |
| 38 #include "modules/indexeddb/IDBPendingTransactionMonitor.h" | 38 #include "modules/indexeddb/IDBPendingTransactionMonitor.h" |
| 39 #include "platform/SharedBuffer.h" | 39 #include "platform/SharedBuffer.h" |
| 40 #include "public/platform/WebIDBDatabase.h" | 40 #include "public/platform/WebIDBDatabase.h" |
| 41 #include <gtest/gtest.h> | 41 #include <gtest/gtest.h> |
| 42 #include <v8.h> | 42 #include <v8.h> |
| 43 | 43 |
| 44 using namespace WebCore; | 44 using namespace blink; |
| 45 | 45 |
| 46 using blink::WebIDBDatabase; | 46 using blink::WebIDBDatabase; |
| 47 | 47 |
| 48 namespace { | 48 namespace { |
| 49 | 49 |
| 50 class IDBTransactionTest : public testing::Test { | 50 class IDBTransactionTest : public testing::Test { |
| 51 public: | 51 public: |
| 52 IDBTransactionTest() | 52 IDBTransactionTest() |
| 53 : m_scope(v8::Isolate::GetCurrent()) | 53 : m_scope(v8::Isolate::GetCurrent()) |
| 54 , m_executionContext(Document::create()) | 54 , m_executionContext(Document::create()) |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // Fire an abort to make sure this doesn't free the transaction during use.
The test | 153 // Fire an abort to make sure this doesn't free the transaction during use.
The test |
| 154 // will not fail if it is, but ASAN would notice the error. | 154 // will not fail if it is, but ASAN would notice the error. |
| 155 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted")); | 155 db->onAbort(transactionId, DOMError::create(AbortError, "Aborted")); |
| 156 | 156 |
| 157 // onAbort() should have cleared the transaction's reference to the database
. | 157 // onAbort() should have cleared the transaction's reference to the database
. |
| 158 Heap::collectAllGarbage(); | 158 Heap::collectAllGarbage(); |
| 159 EXPECT_EQ(0u, set.size()); | 159 EXPECT_EQ(0u, set.size()); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace | 162 } // namespace |
| OLD | NEW |