From ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Mon, 16 May 2011 16:25:10 +0100 Subject: Merge WebKit at r76408: Initial merge by git. Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53 --- .../fast/dom/HTMLKeygenElement/keygen-expected.txt | 8 + .../keygen-option-select-expected.txt | 6 - .../HTMLKeygenElement/keygen-option-select.html | 40 ----- LayoutTests/fast/dom/HTMLKeygenElement/keygen.html | 27 +++ .../create-and-remove-object-store-expected.txt | 12 ++ .../indexeddb/create-and-remove-object-store.html | 7 +- .../create-object-store-options-expected.txt | 2 - .../indexeddb/create-object-store-options.html | 12 +- .../storage/indexeddb/cursor-delete-expected.txt | 9 +- LayoutTests/storage/indexeddb/cursor-delete.html | 7 +- .../objectstore-autoincrement-expected.txt | 183 +++++++++++++++++++++ .../indexeddb/objectstore-autoincrement.html | 181 ++++++++++++++++++++ .../objectstore-removeobjectstore-expected.txt | 10 +- .../indexeddb/objectstore-removeobjectstore.html | 10 +- 14 files changed, 437 insertions(+), 77 deletions(-) create mode 100644 LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt delete mode 100644 LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt delete mode 100644 LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html create mode 100644 LayoutTests/fast/dom/HTMLKeygenElement/keygen.html create mode 100644 LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt create mode 100644 LayoutTests/storage/indexeddb/objectstore-autoincrement.html (limited to 'LayoutTests') diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt new file mode 100644 index 0000000..4d7e1f0 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt @@ -0,0 +1,8 @@ + +Tests the keygen element. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS document.getElementById("keys").options is undefined + diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt deleted file mode 100644 index a6f14fb..0000000 --- a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt +++ /dev/null @@ -1,6 +0,0 @@ - -This test verifies that list-box-style select form control for keygen works properly when selecting from option element. - -You should see the word "SUCCESS" below - -SUCCESS diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html deleted file mode 100644 index 2667715..0000000 --- a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - -

This test verifies that list-box-style select form control for keygen works properly when selecting from option element. -

You should see the word "SUCCESS" below

- -
FAILED
- - - - - diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html b/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html new file mode 100644 index 0000000..59196ac --- /dev/null +++ b/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html @@ -0,0 +1,27 @@ + + + + + + + + +

+
+ + + + + diff --git a/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt b/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt index fd14c83..21f7d8d 100644 --- a/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt +++ b/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt @@ -50,6 +50,18 @@ Adding 'tmp' again PASS code is webkitIDBDatabaseException.CONSTRAINT_ERR trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE}) trans.objectStore('tmp').get(0) +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result is undefined Trying create PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR Trying remove diff --git a/LayoutTests/storage/indexeddb/create-and-remove-object-store.html b/LayoutTests/storage/indexeddb/create-and-remove-object-store.html index c5284af..7bde468 100644 --- a/LayoutTests/storage/indexeddb/create-and-remove-object-store.html +++ b/LayoutTests/storage/indexeddb/create-and-remove-object-store.html @@ -76,12 +76,15 @@ function cleaned() } trans = evalAndLog("trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})"); req = evalAndLog("trans.objectStore('tmp').get(0)"); - req.onsuccess = unexpectedSuccessCallback; - req.onerror = tryOnceMore; + req.onsuccess = tryOnceMore; + req.onerror = unexpectedErrorCallback; } function tryOnceMore() { + verifySuccessEvent(event); + shouldBe("event.result", "undefined"); + testCreateAndRemove(); done(); diff --git a/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt b/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt index 83016d6..9e727a5 100644 --- a/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt +++ b/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt @@ -17,8 +17,6 @@ Deleted all object stores. db.createObjectStore('a', {keyPath: 'a'}) db.createObjectStore('b') db.createObjectStore('c', {autoIncrement: true}); -PASS Exception thrown -PASS code is webkitIDBDatabaseException.UNKNOWN_ERR trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE}) PASS trans.mode is webkitIDBTransaction.READ_WRITE trans.objectStore('a').put({'a': 0}) diff --git a/LayoutTests/storage/indexeddb/create-object-store-options.html b/LayoutTests/storage/indexeddb/create-object-store-options.html index 4abb8f6..eacb09d 100644 --- a/LayoutTests/storage/indexeddb/create-object-store-options.html +++ b/LayoutTests/storage/indexeddb/create-object-store-options.html @@ -44,16 +44,8 @@ function cleaned() evalAndLog("db.createObjectStore('a', {keyPath: 'a'})"); evalAndLog("db.createObjectStore('b')"); - try { - // FIXME: This should work in the future. - debug("db.createObjectStore('c', {autoIncrement: true});"); - db.createObjectStore('c', {autoIncrement: true}); - testFailed('createObjectStore with autoIncrement = true should throw'); - } catch (err) { - testPassed("Exception thrown"); - code = err.code; - shouldBe("code", "webkitIDBDatabaseException.UNKNOWN_ERR"); - } + debug("db.createObjectStore('c', {autoIncrement: true});"); + db.createObjectStore('c', {autoIncrement: true}); trans = evalAndLog("trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})"); shouldBe("trans.mode", "webkitIDBTransaction.READ_WRITE"); diff --git a/LayoutTests/storage/indexeddb/cursor-delete-expected.txt b/LayoutTests/storage/indexeddb/cursor-delete-expected.txt index 8d1bba2..bed1d0d 100644 --- a/LayoutTests/storage/indexeddb/cursor-delete-expected.txt +++ b/LayoutTests/storage/indexeddb/cursor-delete-expected.txt @@ -115,10 +115,10 @@ PASS event.target.readyState is event.target.DONE PASS [object IDBCursor] is non-null. event.result.delete() objectStore.get('myKey1') -Error event fired: -PASS 'result' in event is false -PASS 'code' in event is true -PASS 'message' in event is true +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true @@ -126,6 +126,7 @@ PASS 'onerror' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE +PASS event.result is undefined PASS successfullyParsed is true TEST COMPLETE diff --git a/LayoutTests/storage/indexeddb/cursor-delete.html b/LayoutTests/storage/indexeddb/cursor-delete.html index 9e1ddc3..a3290b9 100644 --- a/LayoutTests/storage/indexeddb/cursor-delete.html +++ b/LayoutTests/storage/indexeddb/cursor-delete.html @@ -115,13 +115,14 @@ function deleteObject() shouldBeNonNull(event.result); evalAndLog("event.result.delete()"); result = evalAndLog("objectStore.get('myKey1')"); - result.onsuccess = unexpectedSuccessCallback; - result.onerror = verifyObjectDeleted; + result.onsuccess = verifyObjectDeleted; + result.onerror = unexpectedErrorCallback; } function verifyObjectDeleted() { - verifyErrorEvent(event); + verifySuccessEvent(event); + shouldBe("event.result", "undefined"); done(); } diff --git a/LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt b/LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt new file mode 100644 index 0000000..8e36c96 --- /dev/null +++ b/LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt @@ -0,0 +1,183 @@ +Test IndexedDB's IDBObjectStore auto-increment feature. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +webkitIndexedDB.open('Address Book') +PASS 'onsuccess' in result is true +PASS 'onerror' in result is true +PASS 'readyState' in result is true +An event should fire shortly... + +openSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +db = event.result +db.setVersion('new version') +PASS 'onsuccess' in result is true +PASS 'onerror' in result is true +PASS 'readyState' in result is true +An event should fire shortly... + +setVersionSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +trans = event.result +PASS trans !== null is true +Deleted all object stores. +createObjectStore(): +store = db.createObjectStore('StoreWithKeyPath', {keyPath: 'id', autoIncrement: true}) +db.createObjectStore('StoreWithAutoIncrement', {autoIncrement: true}) +db.createObjectStore('PlainOldStore', {autoIncrement: false}) +storeNames = db.objectStoreNames +PASS store.name is "StoreWithKeyPath" +PASS store.keyPath is 'id' +PASS storeNames.contains('StoreWithKeyPath') is true +PASS storeNames.contains('StoreWithAutoIncrement') is true +PASS storeNames.contains('PlainOldStore') is true +PASS storeNames.length is 3 +setVersionCompleted(): +trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE}) +store = trans.objectStore('StoreWithKeyPath') +Insert in object store with key gen and key path +store.add({name: 'Lincoln', number: '7012'}) +addLincolnError(): +Error event fired: +PASS 'result' in event is false +PASS 'code' in event is true +PASS 'message' in event is true +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.code is webkitIDBDatabaseException.UNKNOWN_ERR +store = trans.objectStore('StoreWithAutoIncrement') +Insert into object store with key gen using explicit key +store.add({name: 'Lincoln'}, 1) +addWithExplicitKeyError(): +Error event fired: +PASS 'result' in event is false +PASS 'code' in event is true +PASS 'message' in event is true +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.code is webkitIDBDatabaseException.DATA_ERR +Insert into object store with key gen and no key path +store.add({name: 'Lincoln', number: '7012'}) +addLincolnSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result is 1 +store.get(1) +getLincolnSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result.name is "Lincoln" +PASS event.result.number is "7012" +store.put({name: 'Abraham', number: '2107'}) +putAbrahamSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result is 2 +store.get(2) +getAbrahamSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result.name is "Abraham" +PASS event.result.number is "2107" +store = trans.objectStore('PlainOldStore') +Try adding with no key to object store without auto increment. +store.add({name: 'Adam'}) +addAdamError(): +Error event fired: +PASS 'result' in event is false +PASS 'code' in event is true +PASS 'message' in event is true +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.code is webkitIDBDatabaseException.DATA_ERR +store.add({name: 'Adam'}, 1) +addAdamSuccess(): +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false +PASS 'source' in event is true +PASS event.source != null is true +PASS 'onsuccess' in event.target is true +PASS 'onerror' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result is 1 +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/storage/indexeddb/objectstore-autoincrement.html b/LayoutTests/storage/indexeddb/objectstore-autoincrement.html new file mode 100644 index 0000000..2b44a7a --- /dev/null +++ b/LayoutTests/storage/indexeddb/objectstore-autoincrement.html @@ -0,0 +1,181 @@ + + + + + + + + +

+
+ + + diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt index 37492db..45f0708 100644 --- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt +++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt @@ -110,10 +110,10 @@ PASS 'onerror' in result is true PASS 'readyState' in result is true An event should fire shortly... -Error event fired: -PASS 'result' in event is false -PASS 'code' in event is true -PASS 'message' in event is true +Success event fired: +PASS 'result' in event is true +PASS 'code' in event is false +PASS 'message' in event is false PASS 'source' in event is true PASS event.source != null is true PASS 'onsuccess' in event.target is true @@ -121,7 +121,7 @@ PASS 'onerror' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE -PASS event.code is webkitIDBDatabaseException.NOT_FOUND_ERR +PASS event.result is undefined PASS event.source.indexNames.contains('indexName') is false PASS successfullyParsed is true diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html index a08f071..f9b1e78 100644 --- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html +++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html @@ -105,14 +105,14 @@ function getValueAgain() result = evalAndLog("store.get('key')"); verifyResult(result); - result.onsuccess = unexpectedSuccessCallback; - result.onerror = verifyError; + result.onsuccess = verifyNotFound; + result.onerror = unexpectedErrorCallback; } -function verifyError() +function verifyNotFound() { - verifyErrorEvent(event); - shouldBe("event.code", "webkitIDBDatabaseException.NOT_FOUND_ERR"); + verifySuccessEvent(event); + shouldBe("event.result", "undefined"); shouldBeFalse("event.source.indexNames.contains('indexName')"); done(); -- cgit v1.1