Diff
Modified: trunk/LayoutTests/ChangeLog (139383 => 139384)
--- trunk/LayoutTests/ChangeLog 2013-01-10 23:43:09 UTC (rev 139383)
+++ trunk/LayoutTests/ChangeLog 2013-01-11 00:01:42 UTC (rev 139384)
@@ -1,3 +1,21 @@
+2013-01-10 Michael Pruett <mich...@68k.org>
+
+ IndexedDB: Update expected results for IndexedDB layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=106411
+
+ Reviewed by Tony Chang.
+
+ For IndexedDB layout tests whose output differs between V8 and
+ JSC, move V8 test output to platform/chromium and set expected
+ results to JSC test output.
+
+ * platform/chromium/storage/indexeddb/exception-in-event-aborts-expected.txt: Copied from LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt.
+ * platform/chromium/storage/indexeddb/transaction-error-expected.txt: Copied from LayoutTests/storage/indexeddb/transaction-error-expected.txt.
+ * platform/chromium/storage/indexeddb/version-change-abort-expected.txt: Copied from LayoutTests/storage/indexeddb/version-change-abort-expected.txt.
+ * storage/indexeddb/exception-in-event-aborts-expected.txt:
+ * storage/indexeddb/transaction-error-expected.txt:
+ * storage/indexeddb/version-change-abort-expected.txt:
+
2013-01-10 Dimitri Glazkov <dglaz...@chromium.org>
Layout Test fast/dom/HTMLTemplateElement/ownerDocument-adoptNode.html is flaky.
Copied: trunk/LayoutTests/platform/chromium/storage/indexeddb/exception-in-event-aborts-expected.txt (from rev 139383, trunk/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt) (0 => 139384)
--- trunk/LayoutTests/platform/chromium/storage/indexeddb/exception-in-event-aborts-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/storage/indexeddb/exception-in-event-aborts-expected.txt 2013-01-11 00:01:42 UTC (rev 139384)
@@ -0,0 +1,60 @@
+CONSOLE MESSAGE: line 35: Uncaught this exception is expected
+CONSOLE MESSAGE: line 35: Uncaught this exception is expected
+Test exceptions in IDBRequest handlers cause aborts.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "exception-in-event-aborts.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('storeName', null)
+store.add({x: 'value', y: 'zzz'}, 'key')
+
+trans = db.transaction(['storeName'], 'readwrite')
+trans._onabort_ = transactionAborted1
+trans._oncomplete_ = unexpectedCompleteCallback
+store = trans.objectStore('storeName')
+store.add({x: 'value2', y: 'zzz2'}, 'key2')
+
+event.preventDefault()
+Throwing
+
+PASS Got expected error: 'this exception is expected'
+PASS The transaction was aborted.
+trans = db.transaction(['storeName'], 'readwrite')
+trans._onabort_ = transactionAborted2
+trans._oncomplete_ = unexpectedCompleteCallback
+store = trans.objectStore('storeName')
+store.add({x: 'value', y: 'zzz'}, 'key')
+
+event.preventDefault()
+Throwing
+
+PASS Got expected error: 'this exception is expected'
+PASS The transaction was aborted.
+trans = db.transaction(['storeName'], 'readwrite')
+trans._onabort_ = unexpectedAbortCallback
+trans._oncomplete_ = transactionCompleted1
+store = trans.objectStore('storeName')
+store.add({x: 'value3', y: 'zzz3'}, 'key3')
+
+event.preventDefault()
+Throwing within a try block
+
+PASS The transaction completed.
+trans = db.transaction(['storeName'], 'readwrite')
+trans._onabort_ = unexpectedAbortCallback
+trans._oncomplete_ = transactionCompleted2
+store = trans.objectStore('storeName')
+store.add({x: 'value4', y: 'zzz4'}, 'key4')
+PASS key4 added
+
+PASS The transaction completed.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: trunk/LayoutTests/platform/chromium/storage/indexeddb/transaction-error-expected.txt (from rev 139383, trunk/LayoutTests/storage/indexeddb/transaction-error-expected.txt) (0 => 139384)
--- trunk/LayoutTests/platform/chromium/storage/indexeddb/transaction-error-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/storage/indexeddb/transaction-error-expected.txt 2013-01-11 00:01:42 UTC (rev 139384)
@@ -0,0 +1,66 @@
+CONSOLE MESSAGE: line 73: Uncaught Error: This should *NOT* be caught!
+Test IDBTransaction.error cases.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "transaction-error.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('storeName')
+store.add('value', 'key')
+
+trans = db.transaction('storeName')
+
+IDBTransaction.error should be null if transaction is not finished:
+PASS trans.error is null
+
+If IDBTransaction.abort() is explicitly called, IDBTransaction.error should be null:
+trans.abort()
+PASS trans.error is null
+
+If the transaction is aborted due to a request error that is not prevented, IDBTransaction.error should match:
+trans = db.transaction('storeName', 'readwrite')
+request = trans.objectStore('storeName').add('value2', 'key')
+PASS request.error.name is 'ConstraintError'
+request_error = request.error
+Transaction received abort event.
+PASS trans.error is non-null.
+trans.webkitErrorMessage = Key already exists in the object store.
+PASS trans.webkitErrorMessage is non-null.
+PASS trans.error is request_error
+
+If the transaction is aborted due to an exception thrown from event callback, IDBTransaction.error should be AbortError:
+trans = db.transaction('storeName', 'readwrite')
+request = trans.objectStore('storeName').add('value2', 'key')
+PASS request.error.name is 'ConstraintError'
+Throwing exception...
+Transaction received abort event.
+PASS trans.error is non-null.
+trans.webkitErrorMessage = Uncaught exception in event handler.
+PASS trans.webkitErrorMessage is non-null.
+PASS trans.error.name is 'AbortError'
+
+If the transaction is aborted due to an error during commit, IDBTransaction.error should reflect that error:
+trans = db.transaction('storeName', 'readwrite')
+request = trans.objectStore('storeName').add({id: 1}, 'record1')
+request = trans.objectStore('storeName').add({id: 1}, 'record2')
+request = indexedDB.open(dbname, 2)
+trans = request.transaction
+This should fail due to the unique constraint:
+indexName = 'Also test utf8: 漢'
+trans.objectStore('storeName').createIndex(indexName, 'id', {unique: true})
+Transaction received abort event.
+PASS trans.error is non-null.
+PASS trans.error.name is 'ConstraintError'
+trans.webkitErrorMessage = Unable to add key to index 'Also test utf8: æ¼¢': at least one key does not satisfy the uniqueness requirements.
+PASS trans.webkitErrorMessage is non-null.
+Note: This fails because of http://wkb.ug/37327
+FAIL trans.webkitErrorMessage.indexOf(indexName) should not be -1.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: trunk/LayoutTests/platform/chromium/storage/indexeddb/version-change-abort-expected.txt (from rev 139383, trunk/LayoutTests/storage/indexeddb/version-change-abort-expected.txt) (0 => 139384)
--- trunk/LayoutTests/platform/chromium/storage/indexeddb/version-change-abort-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/storage/indexeddb/version-change-abort-expected.txt 2013-01-11 00:01:42 UTC (rev 139384)
@@ -0,0 +1,33 @@
+CONSOLE MESSAGE: line 52: Uncaught Error: This should *NOT* be caught!
+Ensure that aborted VERSION_CHANGE transactions are completely rolled back
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname = "version-change-abort.html"
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+PASS trans instanceof IDBTransaction is true
+store = db.createObjectStore('store1')
+setVersion1 complete
+PASS db.version is 1
+
+vcreq = indexedDB.open(dbname, 2)
+setVersion2() callback
+PASS db.version is 2
+PASS vcreq.transaction instanceof IDBTransaction is true
+store = db.deleteObjectStore('store1')
+store = db.createObjectStore('store2')
+raising exception
+
+setVersion2Abort() callback
+request = indexedDB.open(dbname)
+PASS db.version is 1
+PASS db.objectStoreNames.contains('store1') is true
+PASS db.objectStoreNames.contains('store2') is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Modified: trunk/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt (139383 => 139384)
--- trunk/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt 2013-01-10 23:43:09 UTC (rev 139383)
+++ trunk/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt 2013-01-11 00:01:42 UTC (rev 139384)
@@ -1,5 +1,5 @@
-CONSOLE MESSAGE: line 35: Uncaught this exception is expected
-CONSOLE MESSAGE: line 35: Uncaught this exception is expected
+CONSOLE MESSAGE: this exception is expected
+CONSOLE MESSAGE: this exception is expected
Test exceptions in IDBRequest handlers cause aborts.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Modified: trunk/LayoutTests/storage/indexeddb/transaction-error-expected.txt (139383 => 139384)
--- trunk/LayoutTests/storage/indexeddb/transaction-error-expected.txt 2013-01-10 23:43:09 UTC (rev 139383)
+++ trunk/LayoutTests/storage/indexeddb/transaction-error-expected.txt 2013-01-11 00:01:42 UTC (rev 139384)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 73: Uncaught Error: This should *NOT* be caught!
+CONSOLE MESSAGE: line 73: Error: This should *NOT* be caught!
Test IDBTransaction.error cases.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Modified: trunk/LayoutTests/storage/indexeddb/version-change-abort-expected.txt (139383 => 139384)
--- trunk/LayoutTests/storage/indexeddb/version-change-abort-expected.txt 2013-01-10 23:43:09 UTC (rev 139383)
+++ trunk/LayoutTests/storage/indexeddb/version-change-abort-expected.txt 2013-01-11 00:01:42 UTC (rev 139384)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 52: Uncaught Error: This should *NOT* be caught!
+CONSOLE MESSAGE: line 52: Error: This should *NOT* be caught!
Ensure that aborted VERSION_CHANGE transactions are completely rolled back
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".