Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jan 2016 18:48:03 +0000 (18:48 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jan 2016 18:48:03 +0000 (18:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152891

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* indexeddb/idbobjectstore_createIndex6-event_order-expected.txt:
* indexeddb/idbobjectstore_createIndex7-event_order-expected.txt:

Source/WebCore:

No new tests (At least two failing tests now pass).

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Whenever we add the IDBTransaction as an event target,
  also add the IDBDatabase.

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt.
* platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194771 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt
LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt [new file with mode: 0644]
LayoutTests/platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp

index 4202b18c3e2ea21bfa68814eada10fd538922da1..3d65d91a035da83dbc4e12e4cfbdbf5c4d32aa03 100644 (file)
@@ -1,3 +1,14 @@
+2016-01-08  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152891
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-wk1/TestExpectations:
+        * platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt.
+        * platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt.
+
 2016-01-08  Brady Eidson  <beidson@apple.com>
 
         Modern IDB: storage/indexeddb/dont-wedge.html is flaky.
index fab0df6c69b8601239a0a604da45b92c28137836..ed1e3a6bc3b9c6566a04403a5265f1566c5ec1a2 100644 (file)
@@ -1,3 +1,13 @@
+2016-01-08  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152891
+
+        Reviewed by Alex Christensen.
+
+        * indexeddb/idbobjectstore_createIndex6-event_order-expected.txt:
+        * indexeddb/idbobjectstore_createIndex7-event_order-expected.txt:
+
 2016-01-07  Brady Eidson  <beidson@apple.com>
 
         Modern IDB: Add expectations for W3C tests that were missing them.
index bb46df51a390b44dc0784b36a8aae75f29e50a21..a1e5355ff60c721f72dc355d368ff326caa6a401 100644 (file)
@@ -1,3 +1,3 @@
 
-FAIL IDBObjectStore.createIndex() - event order when unique constraint is triggered assert_unreached: unexpected open.success event Reached unreachable code
+PASS IDBObjectStore.createIndex() - event order when unique constraint is triggered 
 
index 42938c0ec941b80f826a8f92204b68f4dca6c98d..853ed1e3eaa1b5c26c98cda86d4850502793093b 100644 (file)
@@ -1,3 +1,3 @@
 
-FAIL IDBObjectStore.createIndex() - Event ordering for ConstraintError on request assert_unreached: unexpected open.success event Reached unreachable code
+PASS IDBObjectStore.createIndex() - Event ordering for ConstraintError on request 
 
index e37b2d8ae687926cecfa0003599fb8bae7dc22aa..0400307be379a5ac8f8cc00fd9863c745b4421e0 100644 (file)
@@ -74,8 +74,6 @@ imported/w3c/indexeddb/interfaces.html [ Skip ]
 imported/w3c/indexeddb/keyorder.htm [ Skip ]
 
 # W3C IDB tests - Legacy IDB fails, Modern IDB fails differently
-imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm [ Failure ]
-imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order.htm [ Failure ]
 imported/w3c/indexeddb/idbversionchangeevent.htm [ Failure ]
 imported/w3c/indexeddb/keypath.htm [ Failure ]
 
diff --git a/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt b/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order-expected.txt
new file mode 100644 (file)
index 0000000..bb46df5
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL IDBObjectStore.createIndex() - event order when unique constraint is triggered assert_unreached: unexpected open.success event Reached unreachable code
+
diff --git a/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt b/LayoutTests/platform/wk2/imported/w3c/indexeddb/idbobjectstore_createIndex7-event_order-expected.txt
new file mode 100644 (file)
index 0000000..42938c0
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL IDBObjectStore.createIndex() - Event ordering for ConstraintError on request assert_unreached: unexpected open.success event Reached unreachable code
+
index d8de6113c8a58b7110eb40e20b9803d5539112cb..fcbda45fd0fa11dfb9ed065529c399ef464cff34 100644 (file)
@@ -1,3 +1,16 @@
+2016-01-08  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152891
+
+        Reviewed by Alex Christensen.
+
+        No new tests (At least two failing tests now pass).
+
+        * Modules/indexeddb/client/IDBRequestImpl.cpp:
+        (WebCore::IDBClient::IDBRequest::dispatchEvent): Whenever we add the IDBTransaction as an event target,
+          also add the IDBDatabase.
+
 2016-01-07  Antti Koivisto  <antti@apple.com>
 
         Enable selector filtering for shadow trees
index f9905bde16e32d2765190bd35aae597a3520e4f3..c9060a1339971e1e924d952b6003a720fd99e08a 100644 (file)
@@ -276,10 +276,8 @@ bool IDBRequest::dispatchEvent(Event& event)
 
     if (&event == m_openDatabaseSuccessEvent)
         m_openDatabaseSuccessEvent = nullptr;
-    else if (m_transaction) {
-        if (!m_transaction->isFinished())
+    else if (m_transaction && !m_transaction->isFinished()) {
             targets.append(m_transaction);
-        if (!m_transaction->database().isClosingOrClosed())
             targets.append(m_transaction->db());
     }