Diff
Modified: trunk/LayoutTests/ChangeLog (208567 => 208568)
--- trunk/LayoutTests/ChangeLog 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/LayoutTests/ChangeLog 2016-11-10 23:27:37 UTC (rev 208568)
@@ -1,3 +1,14 @@
+2016-11-10 Brady Eidson <[email protected]>
+
+ IndexedDB 2.0 Support the IDBDatabase.onclose event.
+ https://bugs.webkit.org/show_bug.cgi?id=164602
+
+ Reviewed by Alex Christensen.
+
+ * TestExpectations:
+ * storage/indexeddb/modern/handle-user-delete-expected.txt:
+ * storage/indexeddb/modern/resources/handle-user-delete.js:
+
2016-11-10 Ryan Haddad <[email protected]>
Marking swipe/pushState-cached-back-swipe.html and swipe/main-frame-pinning-requirement.html as failing.
Modified: trunk/LayoutTests/TestExpectations (208567 => 208568)
--- trunk/LayoutTests/TestExpectations 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/LayoutTests/TestExpectations 2016-11-10 23:27:37 UTC (rev 208568)
@@ -803,9 +803,6 @@
########################################
### START OF IndexedDB failures
-# Our IDL parser test harness is not what this test expects
-imported/w3c/web-platform-tests/IndexedDB/interfaces.html [ Skip ]
-
# Times out for unexplored reasons
storage/indexeddb/database-quota.html [ Skip ]
storage/indexeddb/database-quota-private.html [ Skip ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208567 => 208568)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-11-10 23:27:37 UTC (rev 208568)
@@ -1,3 +1,12 @@
+2016-11-10 Brady Eidson <[email protected]>
+
+ IndexedDB 2.0 Support the IDBDatabase.onclose event.
+ https://bugs.webkit.org/show_bug.cgi?id=164602
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/IndexedDB/interfaces-expected.txt:
+
2016-11-05 Jiewen Tan <[email protected]>
Update SubtleCrypto::importKey to match the latest spec
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces-expected.txt (208567 => 208568)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces-expected.txt 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces-expected.txt 2016-11-10 23:27:37 UTC (rev 208568)
@@ -1,2 +1,161 @@
-FAIL: Timed out waiting for notifyDone to be called
+IndexedDB IDL tests
+
+PASS Window interface: attribute indexedDB
+PASS IDBKeyRange interface: existence and properties of interface object
+PASS IDBKeyRange interface object length
+PASS IDBKeyRange interface object name
+PASS IDBKeyRange interface: existence and properties of interface prototype object
+PASS IDBKeyRange interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBKeyRange interface: attribute lower
+PASS IDBKeyRange interface: attribute upper
+PASS IDBKeyRange interface: attribute lowerOpen
+PASS IDBKeyRange interface: attribute upperOpen
+PASS IDBKeyRange interface: operation only(any)
+PASS IDBKeyRange interface: operation lowerBound(any,boolean)
+PASS IDBKeyRange interface: operation upperBound(any,boolean)
+PASS IDBKeyRange interface: operation bound(any,any,boolean,boolean)
+PASS IDBKeyRange must be primary interface of IDBKeyRange.only(0)
+PASS Stringification of IDBKeyRange.only(0)
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "lower" with the proper type (0)
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "upper" with the proper type (1)
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "lowerOpen" with the proper type (2)
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "upperOpen" with the proper type (3)
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "only" with the proper type (4)
+PASS IDBKeyRange interface: calling only(any) on IDBKeyRange.only(0) with too few arguments must throw TypeError
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "lowerBound" with the proper type (5)
+PASS IDBKeyRange interface: calling lowerBound(any,boolean) on IDBKeyRange.only(0) with too few arguments must throw TypeError
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "upperBound" with the proper type (6)
+PASS IDBKeyRange interface: calling upperBound(any,boolean) on IDBKeyRange.only(0) with too few arguments must throw TypeError
+PASS IDBKeyRange interface: IDBKeyRange.only(0) must inherit property "bound" with the proper type (7)
+PASS IDBKeyRange interface: calling bound(any,any,boolean,boolean) on IDBKeyRange.only(0) with too few arguments must throw TypeError
+PASS IDBRequest interface: existence and properties of interface object
+PASS IDBRequest interface object length
+PASS IDBRequest interface object name
+PASS IDBRequest interface: existence and properties of interface prototype object
+PASS IDBRequest interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBRequest interface: attribute result
+PASS IDBRequest interface: attribute error
+PASS IDBRequest interface: attribute source
+PASS IDBRequest interface: attribute transaction
+PASS IDBRequest interface: attribute readyState
+PASS IDBRequest interface: attribute onsuccess
+PASS IDBRequest interface: attribute onerror
+PASS IDBOpenDBRequest interface: existence and properties of interface object
+PASS IDBOpenDBRequest interface object length
+PASS IDBOpenDBRequest interface object name
+PASS IDBOpenDBRequest interface: existence and properties of interface prototype object
+PASS IDBOpenDBRequest interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBOpenDBRequest interface: attribute onblocked
+PASS IDBOpenDBRequest interface: attribute onupgradeneeded
+PASS IDBVersionChangeEvent interface: existence and properties of interface object
+PASS IDBVersionChangeEvent interface object length
+PASS IDBVersionChangeEvent interface object name
+PASS IDBVersionChangeEvent interface: existence and properties of interface prototype object
+PASS IDBVersionChangeEvent interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBVersionChangeEvent interface: attribute oldVersion
+PASS IDBVersionChangeEvent interface: attribute newVersion
+PASS IDBVersionChangeEvent must be primary interface of new IDBVersionChangeEvent('foo')
+PASS Stringification of new IDBVersionChangeEvent('foo')
+PASS IDBVersionChangeEvent interface: new IDBVersionChangeEvent('foo') must inherit property "oldVersion" with the proper type (0)
+PASS IDBVersionChangeEvent interface: new IDBVersionChangeEvent('foo') must inherit property "newVersion" with the proper type (1)
+PASS IDBFactory interface: existence and properties of interface object
+PASS IDBFactory interface object length
+PASS IDBFactory interface object name
+PASS IDBFactory interface: existence and properties of interface prototype object
+PASS IDBFactory interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBFactory interface: operation open(DOMString,unsigned long long)
+PASS IDBFactory interface: operation deleteDatabase(DOMString)
+PASS IDBFactory interface: operation cmp(any,any)
+PASS IDBFactory must be primary interface of window.indexedDB
+PASS Stringification of window.indexedDB
+PASS IDBFactory interface: window.indexedDB must inherit property "open" with the proper type (0)
+PASS IDBFactory interface: calling open(DOMString,unsigned long long) on window.indexedDB with too few arguments must throw TypeError
+PASS IDBFactory interface: window.indexedDB must inherit property "deleteDatabase" with the proper type (1)
+PASS IDBFactory interface: calling deleteDatabase(DOMString) on window.indexedDB with too few arguments must throw TypeError
+PASS IDBFactory interface: window.indexedDB must inherit property "cmp" with the proper type (2)
+PASS IDBFactory interface: calling cmp(any,any) on window.indexedDB with too few arguments must throw TypeError
+PASS IDBDatabase interface: existence and properties of interface object
+PASS IDBDatabase interface object length
+PASS IDBDatabase interface object name
+PASS IDBDatabase interface: existence and properties of interface prototype object
+PASS IDBDatabase interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBDatabase interface: attribute name
+PASS IDBDatabase interface: attribute version
+PASS IDBDatabase interface: attribute objectStoreNames
+PASS IDBDatabase interface: operation createObjectStore(DOMString,IDBObjectStoreParameters)
+PASS IDBDatabase interface: operation deleteObjectStore(DOMString)
+PASS IDBDatabase interface: operation transaction([object Object],[object Object],IDBTransactionMode)
+PASS IDBDatabase interface: operation close()
+PASS IDBDatabase interface: attribute onabort
+PASS IDBDatabase interface: attribute onclose
+PASS IDBDatabase interface: attribute onerror
+PASS IDBDatabase interface: attribute onversionchange
+PASS IDBObjectStore interface: existence and properties of interface object
+PASS IDBObjectStore interface object length
+PASS IDBObjectStore interface object name
+PASS IDBObjectStore interface: existence and properties of interface prototype object
+PASS IDBObjectStore interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBObjectStore interface: attribute name
+PASS IDBObjectStore interface: attribute keyPath
+PASS IDBObjectStore interface: attribute indexNames
+PASS IDBObjectStore interface: attribute transaction
+PASS IDBObjectStore interface: attribute autoIncrement
+PASS IDBObjectStore interface: operation put(any,any)
+PASS IDBObjectStore interface: operation add(any,any)
+PASS IDBObjectStore interface: operation delete(any)
+PASS IDBObjectStore interface: operation get(any)
+PASS IDBObjectStore interface: operation clear()
+PASS IDBObjectStore interface: operation openCursor(any,IDBCursorDirection)
+PASS IDBObjectStore interface: operation createIndex(DOMString,[object Object],[object Object],IDBIndexParameters)
+PASS IDBObjectStore interface: operation index(DOMString)
+PASS IDBObjectStore interface: operation deleteIndex(DOMString)
+PASS IDBObjectStore interface: operation count(any)
+PASS IDBIndex interface: existence and properties of interface object
+PASS IDBIndex interface object length
+PASS IDBIndex interface object name
+PASS IDBIndex interface: existence and properties of interface prototype object
+PASS IDBIndex interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBIndex interface: attribute name
+PASS IDBIndex interface: attribute objectStore
+PASS IDBIndex interface: attribute keyPath
+PASS IDBIndex interface: attribute multiEntry
+PASS IDBIndex interface: attribute unique
+PASS IDBIndex interface: operation openCursor(any,IDBCursorDirection)
+PASS IDBIndex interface: operation openKeyCursor(any,IDBCursorDirection)
+PASS IDBIndex interface: operation get(any)
+PASS IDBIndex interface: operation getKey(any)
+PASS IDBIndex interface: operation count(any)
+PASS IDBCursor interface: existence and properties of interface object
+PASS IDBCursor interface object length
+PASS IDBCursor interface object name
+PASS IDBCursor interface: existence and properties of interface prototype object
+PASS IDBCursor interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBCursor interface: attribute source
+PASS IDBCursor interface: attribute direction
+PASS IDBCursor interface: attribute key
+PASS IDBCursor interface: attribute primaryKey
+PASS IDBCursor interface: operation update(any)
+PASS IDBCursor interface: operation advance(unsigned long)
+PASS IDBCursor interface: operation continue(any)
+PASS IDBCursor interface: operation delete()
+PASS IDBCursorWithValue interface: existence and properties of interface object
+PASS IDBCursorWithValue interface object length
+PASS IDBCursorWithValue interface object name
+PASS IDBCursorWithValue interface: existence and properties of interface prototype object
+PASS IDBCursorWithValue interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBCursorWithValue interface: attribute value
+PASS IDBTransaction interface: existence and properties of interface object
+PASS IDBTransaction interface object length
+PASS IDBTransaction interface object name
+PASS IDBTransaction interface: existence and properties of interface prototype object
+PASS IDBTransaction interface: existence and properties of interface prototype object's "constructor" property
+PASS IDBTransaction interface: attribute mode
+PASS IDBTransaction interface: attribute db
+PASS IDBTransaction interface: attribute error
+PASS IDBTransaction interface: operation objectStore(DOMString)
+PASS IDBTransaction interface: operation abort()
+PASS IDBTransaction interface: attribute onabort
+PASS IDBTransaction interface: attribute oncomplete
+PASS IDBTransaction interface: attribute onerror
+
Modified: trunk/LayoutTests/storage/indexeddb/modern/handle-user-delete-expected.txt (208567 => 208568)
--- trunk/LayoutTests/storage/indexeddb/modern/handle-user-delete-expected.txt 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/LayoutTests/storage/indexeddb/modern/handle-user-delete-expected.txt 2016-11-10 23:27:37 UTC (rev 208568)
@@ -12,6 +12,7 @@
Requested clearAllDatabases
[PASS] Both requests hit a failure condition (Received onerror or failed to start a new request because the transaction was aborted)
[PASS] Database received correct error.
+[PASS] Database received onclose event.
[PASS] Transaction aborted.
PASS successfullyParsed is true
Modified: trunk/LayoutTests/storage/indexeddb/modern/resources/handle-user-delete.js (208567 => 208568)
--- trunk/LayoutTests/storage/indexeddb/modern/resources/handle-user-delete.js 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/handle-user-delete.js 2016-11-10 23:27:37 UTC (rev 208568)
@@ -4,6 +4,7 @@
var requestErrorCount = 0;
var databaseError = false;
+var databaseOnclose = false;
var transactionAbort = false;
function done()
@@ -18,6 +19,11 @@
else
log("[FAIL] Database did not receive correct error.");
+ if (databaseOnclose)
+ log("[PASS] Database received onclose event.");
+ else
+ log("[FAIL] Database did not receive onclose event.");
+
if (transactionAbort)
log("[PASS] Transaction aborted.");
else
@@ -33,7 +39,7 @@
function maybeFinish()
{
- if (requestErrorCount == 2 && databaseError && transactionAbort)
+ if (requestErrorCount == 2 && databaseError && databaseOnclose && transactionAbort)
done();
}
@@ -51,6 +57,11 @@
maybeFinish();
}
+ database._onclose_ = function(event) {
+ databaseOnclose = true;
+ maybeFinish();
+ }
+
var hasClearedDatabases = false;
var spinGet = function() {
try {
Modified: trunk/Source/WebCore/ChangeLog (208567 => 208568)
--- trunk/Source/WebCore/ChangeLog 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/Source/WebCore/ChangeLog 2016-11-10 23:27:37 UTC (rev 208568)
@@ -1,3 +1,16 @@
+2016-11-10 Brady Eidson <[email protected]>
+
+ IndexedDB 2.0 Support the IDBDatabase.onclose event.
+ https://bugs.webkit.org/show_bug.cgi?id=164602
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Covered by existing tests).
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::connectionToServerLost): Fire "onclose" after "onerror"
+ * Modules/indexeddb/IDBDatabase.idl:
+
2016-11-10 Ryosuke Niwa <[email protected]>
Copied text would contain text inside CDATA sections and comments
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (208567 => 208568)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2016-11-10 23:27:37 UTC (rev 208568)
@@ -262,11 +262,17 @@
for (auto& transaction : m_activeTransactions.values())
transaction->connectionClosedFromServer(error);
- Ref<Event> event = Event::create(m_eventNames.errorEvent, true, false);
- event->setTarget(this);
+ auto errorEvent = Event::create(m_eventNames.errorEvent, true, false);
+ errorEvent->setTarget(this);
if (auto* context = scriptExecutionContext())
- context->eventQueue().enqueueEvent(WTFMove(event));
+ context->eventQueue().enqueueEvent(WTFMove(errorEvent));
+
+ auto closeEvent = Event::create(m_eventNames.closeEvent, true, false);
+ closeEvent->setTarget(this);
+
+ if (auto* context = scriptExecutionContext())
+ context->eventQueue().enqueueEvent(WTFMove(closeEvent));
}
void IDBDatabase::maybeCloseInServer()
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (208567 => 208568)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl 2016-11-10 23:07:15 UTC (rev 208567)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl 2016-11-10 23:27:37 UTC (rev 208568)
@@ -45,6 +45,7 @@
void close();
attribute EventHandler onabort;
+ attribute EventHandler onclose;
attribute EventHandler onerror;
attribute EventHandler onversionchange;
};