From 4a156157940f51b91eadd76f6c86f862ec0a1da0 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 6 Jan 2011 21:36:31 +0000 Subject: Merge WebKit at Chromium 9.0.597.55: trivial merge by git Change-Id: I2c6f2ebc4431d15ac82b5b1a9f08159e1731bc57 --- .../storage/indexeddb/constants-expected.txt | 20 ++++---- LayoutTests/storage/indexeddb/constants.html | 20 ++++---- .../storage/indexeddb/index-basics-expected.txt | 23 ++++++++- LayoutTests/storage/indexeddb/index-basics.html | 16 +++++- LayoutTests/storage/indexeddb/index-cursor.html | 4 +- .../storage/indexeddb/keyrange-expected.txt | 60 ++++++++++++++++++++++ LayoutTests/storage/indexeddb/keyrange.html | 13 +++++ .../storage/indexeddb/objectstore-cursor.html | 4 +- .../objectstore-removeobjectstore-expected.txt | 2 +- .../indexeddb/objectstore-removeobjectstore.html | 2 +- 10 files changed, 134 insertions(+), 30 deletions(-) (limited to 'LayoutTests') diff --git a/LayoutTests/storage/indexeddb/constants-expected.txt b/LayoutTests/storage/indexeddb/constants-expected.txt index ead0937..110a68d 100644 --- a/LayoutTests/storage/indexeddb/constants-expected.txt +++ b/LayoutTests/storage/indexeddb/constants-expected.txt @@ -4,16 +4,16 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE PASS webkitIDBDatabaseException.UNKNOWN_ERR is 1 -PASS webkitIDBDatabaseException.NON_TRANSIENT_ERR is 1 -PASS webkitIDBDatabaseException.NOT_FOUND_ERR is 2 -PASS webkitIDBDatabaseException.CONSTRAINT_ERR is 3 -PASS webkitIDBDatabaseException.DATA_ERR is 4 -PASS webkitIDBDatabaseException.NOT_ALLOWED_ERR is 5 -PASS webkitIDBDatabaseException.SERIAL_ERR is 11 -PASS webkitIDBDatabaseException.RECOVERABLE_ERR is 21 -PASS webkitIDBDatabaseException.TRANSIENT_ERR is 31 -PASS webkitIDBDatabaseException.TIMEOUT_ERR is 32 -PASS webkitIDBDatabaseException.DEADLOCK_ERR is 33 +PASS webkitIDBDatabaseException.NON_TRANSIENT_ERR is 2 +PASS webkitIDBDatabaseException.NOT_FOUND_ERR is 3 +PASS webkitIDBDatabaseException.CONSTRAINT_ERR is 4 +PASS webkitIDBDatabaseException.DATA_ERR is 5 +PASS webkitIDBDatabaseException.NOT_ALLOWED_ERR is 6 +PASS webkitIDBDatabaseException.SERIAL_ERR is 7 +PASS webkitIDBDatabaseException.RECOVERABLE_ERR is 8 +PASS webkitIDBDatabaseException.TRANSIENT_ERR is 9 +PASS webkitIDBDatabaseException.TIMEOUT_ERR is 10 +PASS webkitIDBDatabaseException.DEADLOCK_ERR is 11 PASS webkitIDBRequest.LOADING is 1 PASS webkitIDBRequest.DONE is 2 PASS webkitIDBCursor.NEXT is 0 diff --git a/LayoutTests/storage/indexeddb/constants.html b/LayoutTests/storage/indexeddb/constants.html index 7909e24..03af61b 100644 --- a/LayoutTests/storage/indexeddb/constants.html +++ b/LayoutTests/storage/indexeddb/constants.html @@ -17,16 +17,16 @@ if (window.layoutTestController) function test() { shouldBe("webkitIDBDatabaseException.UNKNOWN_ERR", "1"); - shouldBe("webkitIDBDatabaseException.NON_TRANSIENT_ERR", "1"); - shouldBe("webkitIDBDatabaseException.NOT_FOUND_ERR", "2"); - shouldBe("webkitIDBDatabaseException.CONSTRAINT_ERR", "3"); - shouldBe("webkitIDBDatabaseException.DATA_ERR", "4"); - shouldBe("webkitIDBDatabaseException.NOT_ALLOWED_ERR", "5"); - shouldBe("webkitIDBDatabaseException.SERIAL_ERR", "11"); - shouldBe("webkitIDBDatabaseException.RECOVERABLE_ERR", "21"); - shouldBe("webkitIDBDatabaseException.TRANSIENT_ERR", "31"); - shouldBe("webkitIDBDatabaseException.TIMEOUT_ERR", "32"); - shouldBe("webkitIDBDatabaseException.DEADLOCK_ERR", "33"); + shouldBe("webkitIDBDatabaseException.NON_TRANSIENT_ERR", "2"); + shouldBe("webkitIDBDatabaseException.NOT_FOUND_ERR", "3"); + shouldBe("webkitIDBDatabaseException.CONSTRAINT_ERR", "4"); + shouldBe("webkitIDBDatabaseException.DATA_ERR", "5"); + shouldBe("webkitIDBDatabaseException.NOT_ALLOWED_ERR", "6"); + shouldBe("webkitIDBDatabaseException.SERIAL_ERR", "7"); + shouldBe("webkitIDBDatabaseException.RECOVERABLE_ERR", "8"); + shouldBe("webkitIDBDatabaseException.TRANSIENT_ERR", "9"); + shouldBe("webkitIDBDatabaseException.TIMEOUT_ERR", "10"); + shouldBe("webkitIDBDatabaseException.DEADLOCK_ERR", "11"); shouldBe("webkitIDBRequest.LOADING", "1"); shouldBe("webkitIDBRequest.DONE", "2"); diff --git a/LayoutTests/storage/indexeddb/index-basics-expected.txt b/LayoutTests/storage/indexeddb/index-basics-expected.txt index acc5f4d..099dde3 100644 --- a/LayoutTests/storage/indexeddb/index-basics-expected.txt +++ b/LayoutTests/storage/indexeddb/index-basics-expected.txt @@ -45,6 +45,7 @@ Deleted all object stores. db.createObjectStore('storeName', null) store.createIndex('indexName', 'x') store.createIndex('indexName2', 'y', false) +store.createIndex('zIndex', 'z', true) PASS 'name' in indexObject is true PASS indexObject.name is "indexName" PASS 'storeName' in indexObject is true @@ -57,7 +58,7 @@ PASS 'openKeyCursor' in indexObject is true PASS 'openCursor' in indexObject is true PASS 'getKey' in indexObject is true PASS 'get' in indexObject is true -store.add({x: 'value', y: 'zzz'}, 'key') +store.add({x: 'value', y: 'zzz', z: 2.72}, 'key') PASS 'onsuccess' in result is true PASS 'onerror' in result is true PASS 'readyState' in result is true @@ -74,7 +75,7 @@ PASS 'onerror' in event.target is true PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE -event.source.add({x: 'value2', y: 'zzz2'}, 'key2') +event.source.add({x: 'value2', y: 'zzz2', z: 2.71}, 'key2') PASS 'onsuccess' in result is true PASS 'onerror' in result is true PASS 'readyState' in result is true @@ -127,6 +128,24 @@ PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE PASS event.result is "key" +indexObject3.get(2.71) +PASS 'onsuccess' in result is true +PASS 'onerror' in result is true +PASS 'readyState' in result is true +An event should fire shortly... + +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.x is "value2" indexObject.get('value') PASS 'onsuccess' in result is true PASS 'onerror' in result is true diff --git a/LayoutTests/storage/indexeddb/index-basics.html b/LayoutTests/storage/indexeddb/index-basics.html index 7907070..d5eec0a 100644 --- a/LayoutTests/storage/indexeddb/index-basics.html +++ b/LayoutTests/storage/indexeddb/index-basics.html @@ -49,6 +49,7 @@ function createIndex() window.store = evalAndLog("db.createObjectStore('storeName', null)"); window.indexObject = evalAndLog("store.createIndex('indexName', 'x')"); window.indexObject2 = evalAndLog("store.createIndex('indexName2', 'y', false)"); + window.indexObject3 = evalAndLog("store.createIndex('zIndex', 'z', true)"); addData(); } @@ -67,7 +68,7 @@ function addData() shouldBeTrue("'getKey' in indexObject"); shouldBeTrue("'get' in indexObject"); - result = evalAndLog("store.add({x: 'value', y: 'zzz'}, 'key')"); + result = evalAndLog("store.add({x: 'value', y: 'zzz', z: 2.72}, 'key')"); verifyResult(result); result.onsuccess = addMore; result.onerror = unexpectedErrorCallback; @@ -77,7 +78,7 @@ function addMore() { verifySuccessEvent(event); - result = evalAndLog("event.source.add({x: 'value2', y: 'zzz2'}, 'key2')"); + result = evalAndLog("event.source.add({x: 'value2', y: 'zzz2', z: 2.71}, 'key2')"); verifyResult(result); result.onsuccess = getData; result.onerror = unexpectedErrorCallback; @@ -109,6 +110,17 @@ function getObjectData2() verifySuccessEvent(event); shouldBeEqualToString("event.result", "key"); + result = evalAndLog("indexObject3.get(2.71)"); + verifyResult(result); + result.onsuccess = getObjectData3; + result.onerror = unexpectedErrorCallback; +} + +function getObjectData3() +{ + verifySuccessEvent(event); + shouldBeEqualToString("event.result.x", "value2"); + result = evalAndLog("indexObject.get('value')"); verifyResult(result); result.onsuccess = getDataFail; diff --git a/LayoutTests/storage/indexeddb/index-cursor.html b/LayoutTests/storage/indexeddb/index-cursor.html index fb3147d..1a04d57 100644 --- a/LayoutTests/storage/indexeddb/index-cursor.html +++ b/LayoutTests/storage/indexeddb/index-cursor.html @@ -18,8 +18,8 @@ if (window.layoutTestController) window.testData = [ 1, 1, - 2, - 2, + 3.14159, + 3.14159, 10, // FIXME: Dates. "A big string", diff --git a/LayoutTests/storage/indexeddb/keyrange-expected.txt b/LayoutTests/storage/indexeddb/keyrange-expected.txt index faac937..cb5a380 100644 --- a/LayoutTests/storage/indexeddb/keyrange-expected.txt +++ b/LayoutTests/storage/indexeddb/keyrange-expected.txt @@ -27,6 +27,11 @@ PASS keyRange.lower is 1 PASS keyRange.upper is 1 PASS keyRange.lowerOpen is false PASS keyRange.upperOpen is false +webkitIDBKeyRange.only(3.14) +PASS keyRange.lower is 3.14 +PASS keyRange.upper is 3.14 +PASS keyRange.lowerOpen is false +PASS keyRange.upperOpen is false webkitIDBKeyRange.only('a') PASS keyRange.lower is 'a' PASS keyRange.upper is 'a' @@ -47,6 +52,21 @@ PASS keyRange.lower is 12 PASS keyRange.lowerOpen is false PASS keyRange.upper is null PASS keyRange.upperOpen is false +webkitIDBKeyRange.lowerBound(10.1,true) +PASS keyRange.lower is 10.1 +PASS keyRange.lowerOpen is true +PASS keyRange.upper is null +PASS keyRange.upperOpen is false +webkitIDBKeyRange.lowerBound(11.2,false) +PASS keyRange.lower is 11.2 +PASS keyRange.lowerOpen is false +PASS keyRange.upper is null +PASS keyRange.upperOpen is false +webkitIDBKeyRange.lowerBound(12.3,undefined) +PASS keyRange.lower is 12.3 +PASS keyRange.lowerOpen is false +PASS keyRange.upper is null +PASS keyRange.upperOpen is false webkitIDBKeyRange.lowerBound('aa',true) PASS keyRange.lower is 'aa' PASS keyRange.lowerOpen is true @@ -77,6 +97,21 @@ PASS keyRange.upper is 22 PASS keyRange.upperOpen is false PASS keyRange.lower is null PASS keyRange.lowerOpen is false +webkitIDBKeyRange.upperBound(20.2,true) +PASS keyRange.upper is 20.2 +PASS keyRange.upperOpen is true +PASS keyRange.lower is null +PASS keyRange.lowerOpen is false +webkitIDBKeyRange.upperBound(21.3,false) +PASS keyRange.upper is 21.3 +PASS keyRange.upperOpen is false +PASS keyRange.lower is null +PASS keyRange.lowerOpen is false +webkitIDBKeyRange.upperBound(22.4,undefined) +PASS keyRange.upper is 22.4 +PASS keyRange.upperOpen is false +PASS keyRange.lower is null +PASS keyRange.lowerOpen is false webkitIDBKeyRange.upperBound('ba',true) PASS keyRange.upper is 'ba' PASS keyRange.upperOpen is true @@ -117,6 +152,31 @@ PASS keyRange.lower is 34 PASS keyRange.upper is 44 PASS keyRange.lowerOpen is true PASS keyRange.upperOpen is true +webkitIDBKeyRange.bound(30.1,40.2, {lowerOpen: undefined, upperOpen:undefined}) +PASS keyRange.lower is 30.1 +PASS keyRange.upper is 40.2 +PASS keyRange.lowerOpen is false +PASS keyRange.upperOpen is false +webkitIDBKeyRange.bound(31.3,41.4, {lowerOpen: false, upperOpen:false}) +PASS keyRange.lower is 31.3 +PASS keyRange.upper is 41.4 +PASS keyRange.lowerOpen is false +PASS keyRange.upperOpen is false +webkitIDBKeyRange.bound(32.5,42.6, {lowerOpen: false, upperOpen:true}) +PASS keyRange.lower is 32.5 +PASS keyRange.upper is 42.6 +PASS keyRange.lowerOpen is false +PASS keyRange.upperOpen is true +webkitIDBKeyRange.bound(33.7,43.8, {lowerOpen: true, upperOpen:false}) +PASS keyRange.lower is 33.7 +PASS keyRange.upper is 43.8 +PASS keyRange.lowerOpen is true +PASS keyRange.upperOpen is false +webkitIDBKeyRange.bound(34.9,44, {lowerOpen: true, upperOpen:true}) +PASS keyRange.lower is 34.9 +PASS keyRange.upper is 44 +PASS keyRange.lowerOpen is true +PASS keyRange.upperOpen is true webkitIDBKeyRange.bound('aaa','aba', {lowerOpen: false, upperOpen:false}) PASS keyRange.lower is 'aaa' PASS keyRange.upper is 'aba' diff --git a/LayoutTests/storage/indexeddb/keyrange.html b/LayoutTests/storage/indexeddb/keyrange.html index 4b926da..80850bc 100644 --- a/LayoutTests/storage/indexeddb/keyrange.html +++ b/LayoutTests/storage/indexeddb/keyrange.html @@ -84,11 +84,15 @@ function test() debug(""); checkSingleKeyRange(1); + checkSingleKeyRange(3.14); checkSingleKeyRange("'a'"); checkLowerBoundKeyRange(10, true); checkLowerBoundKeyRange(11, false); checkLowerBoundKeyRange(12); + checkLowerBoundKeyRange(10.1, true); + checkLowerBoundKeyRange(11.2, false); + checkLowerBoundKeyRange(12.3); checkLowerBoundKeyRange("'aa'", true); checkLowerBoundKeyRange("'ab'", false); checkLowerBoundKeyRange("'ac'"); @@ -96,6 +100,9 @@ function test() checkUpperBoundKeyRange(20, true); checkUpperBoundKeyRange(21, false); checkUpperBoundKeyRange(22); + checkUpperBoundKeyRange(20.2, true); + checkUpperBoundKeyRange(21.3, false); + checkUpperBoundKeyRange(22.4); checkUpperBoundKeyRange("'ba'", true); checkUpperBoundKeyRange("'bb'", false); checkUpperBoundKeyRange("'bc'"); @@ -106,6 +113,12 @@ function test() checkBoundKeyRange(33, 43, true, false); checkBoundKeyRange(34, 44, true, true); + checkBoundKeyRange(30.1, 40.2); + checkBoundKeyRange(31.3, 41.4, false, false); + checkBoundKeyRange(32.5, 42.6, false, true); + checkBoundKeyRange(33.7, 43.8, true, false); + checkBoundKeyRange(34.9, 44.0, true, true); + checkBoundKeyRange("'aaa'", "'aba'", false, false); checkBoundKeyRange("'aab'", "'abb'"); checkBoundKeyRange("'aac'", "'abc'", false, false); diff --git a/LayoutTests/storage/indexeddb/objectstore-cursor.html b/LayoutTests/storage/indexeddb/objectstore-cursor.html index 3358917..e0db08f 100644 --- a/LayoutTests/storage/indexeddb/objectstore-cursor.html +++ b/LayoutTests/storage/indexeddb/objectstore-cursor.html @@ -16,9 +16,9 @@ if (window.layoutTestController) // In order of how it should be sorted by IndexedDB. window.testData = [ - 1, - 2, + 2.718281828459, 3, + 3.14159265, 10, // FIXME: Dates. "A bigger string", diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt index 4e5e562..e45ff73 100644 --- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt +++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt @@ -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 2 +PASS event.code is webkitIDBDatabaseException.NOT_FOUND_ERR 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 5f617ca..c531dcf 100644 --- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html +++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html @@ -112,7 +112,7 @@ function getValueAgain() function verifyError() { verifyErrorEvent(event); - shouldBe("event.code", "2"); + shouldBe("event.code", "webkitIDBDatabaseException.NOT_FOUND_ERR"); shouldBeFalse("event.source.indexNames.contains('indexName')"); done(); -- cgit v1.1