From e458d70a0d18538346f41b503114c9ebe6b2ce12 Mon Sep 17 00:00:00 2001 From: Leon Clarke Date: Thu, 15 Jul 2010 12:03:35 +0100 Subject: Merge WebKit at r63173 : Initial merge by git. Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44 --- .../fast/xpath/substring-nan-position-expected.txt | 10 +++ LayoutTests/fast/xpath/substring-nan-position.html | 26 ++++++++ .../substring-non-positive-postion-expected.txt | 10 +++ .../fast/xpath/substring-non-positive-postion.html | 23 +++++++ .../appcache/foreign-iframe-main-expected.txt | 1 + .../tests/appcache/progress-counter-expected.txt | 2 + .../http/tests/appcache/progress-counter.html | 62 +++++++++++++++++++ .../resources/different-https-origin-resource.html | 8 ++- .../appcache/resources/progress-counter.manifest | 3 + .../indexeddb/idb-objectstore-request-expected.txt | 71 +++++++++++++++++++++- .../script-tests/idb-objectstore-request.js | 52 +++++++++++++--- 11 files changed, 258 insertions(+), 10 deletions(-) create mode 100644 LayoutTests/fast/xpath/substring-nan-position-expected.txt create mode 100644 LayoutTests/fast/xpath/substring-nan-position.html create mode 100644 LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt create mode 100644 LayoutTests/fast/xpath/substring-non-positive-postion.html create mode 100644 LayoutTests/http/tests/appcache/progress-counter-expected.txt create mode 100644 LayoutTests/http/tests/appcache/progress-counter.html create mode 100644 LayoutTests/http/tests/appcache/resources/progress-counter.manifest (limited to 'LayoutTests') diff --git a/LayoutTests/fast/xpath/substring-nan-position-expected.txt b/LayoutTests/fast/xpath/substring-nan-position-expected.txt new file mode 100644 index 0000000..136cf21 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-nan-position-expected.txt @@ -0,0 +1,10 @@ +Test for bug 41862: XPath substring function is broken when passing NaN as the position parameter. + +PASS document.evaluate("substring('12345', number('NaN'))", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS document.evaluate("substring('12345', number('NaN'), 3)", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS document.evaluate("substring('12345', number('NaN'), -2147483645)", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS document.evaluate("substring('12345', number('NaN'), number('NaN'))", document, null, XPathResult.STRING_TYPE, null).stringValue is '' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/xpath/substring-nan-position.html b/LayoutTests/fast/xpath/substring-nan-position.html new file mode 100644 index 0000000..d1a1813 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-nan-position.html @@ -0,0 +1,26 @@ + + + + + + + +

Test for bug 41862: +XPath substring function is broken when passing NaN as the position parameter.

+
+ + + + + diff --git a/LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt b/LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt new file mode 100644 index 0000000..d3683b7 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-non-positive-postion-expected.txt @@ -0,0 +1,10 @@ +Test for bug 41913: XPath substring function does not correctly handle non-positive values for the position argument + +PASS document.evaluate("substring('abcde', 0)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde' +PASS document.evaluate("substring('abcde', -2)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde' +PASS document.evaluate("substring('abcde', 0, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcd' +PASS document.evaluate("substring('abcde', -2, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'ab' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/xpath/substring-non-positive-postion.html b/LayoutTests/fast/xpath/substring-non-positive-postion.html new file mode 100644 index 0000000..321bf25 --- /dev/null +++ b/LayoutTests/fast/xpath/substring-non-positive-postion.html @@ -0,0 +1,23 @@ + + + + + + + +

Test for bug 41913: +XPath substring function does not correctly handle non-positive values for the position argument

+
+ + + + + diff --git a/LayoutTests/http/tests/appcache/foreign-iframe-main-expected.txt b/LayoutTests/http/tests/appcache/foreign-iframe-main-expected.txt index 64d4de2..1661ad3 100644 --- a/LayoutTests/http/tests/appcache/foreign-iframe-main-expected.txt +++ b/LayoutTests/http/tests/appcache/foreign-iframe-main-expected.txt @@ -5,6 +5,7 @@ downloading progress progress progress +progress cached SUCCESS diff --git a/LayoutTests/http/tests/appcache/progress-counter-expected.txt b/LayoutTests/http/tests/appcache/progress-counter-expected.txt new file mode 100644 index 0000000..c9e3db2 --- /dev/null +++ b/LayoutTests/http/tests/appcache/progress-counter-expected.txt @@ -0,0 +1,2 @@ +This tests that the lengthComputable / loaded / total properties of the progress event are set correctly. +SUCCESS diff --git a/LayoutTests/http/tests/appcache/progress-counter.html b/LayoutTests/http/tests/appcache/progress-counter.html new file mode 100644 index 0000000..0f9d0b6 --- /dev/null +++ b/LayoutTests/http/tests/appcache/progress-counter.html @@ -0,0 +1,62 @@ + + +
This tests that the lengthComputable / loaded / total properties of the progress event are set correctly.
+ +
FAILURE
+ diff --git a/LayoutTests/http/tests/appcache/resources/different-https-origin-resource.html b/LayoutTests/http/tests/appcache/resources/different-https-origin-resource.html index 674706a..7c24b07 100644 --- a/LayoutTests/http/tests/appcache/resources/different-https-origin-resource.html +++ b/LayoutTests/http/tests/appcache/resources/different-https-origin-resource.html @@ -20,8 +20,14 @@ function error() hadError = true; finish(); } +function progressHandler(e) +{ + // The only resource listed in the manifest file is in a different https origin and should be skipped. + if (e.loaded != 0 || e.total != 0) + fail(); +} -applicationCache.onprogress = function() { fail(); } +applicationCache.onprogress = progressHandler; applicationCache.onnoupdate = function() { finish(); } applicationCache.oncached = function() { finish(); } applicationCache.onerror = function() { error(); } diff --git a/LayoutTests/http/tests/appcache/resources/progress-counter.manifest b/LayoutTests/http/tests/appcache/resources/progress-counter.manifest new file mode 100644 index 0000000..7877cd8 --- /dev/null +++ b/LayoutTests/http/tests/appcache/resources/progress-counter.manifest @@ -0,0 +1,3 @@ +CACHE MANIFEST +simple.txt +empty.txt diff --git a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt b/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt index bcf1d63..30bac34 100644 --- a/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt +++ b/LayoutTests/storage/indexeddb/idb-objectstore-request-expected.txt @@ -3,12 +3,14 @@ Test IndexedDB's IDBObjectStoreRequest. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". +indexedDB.open('name', 'description') PASS 'onsuccess' in result is true PASS 'onerror' in result is true PASS 'abort' 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 @@ -22,12 +24,14 @@ PASS 'readyState' in event.target is true PASS event.target.readyState is event.target.DONE db = event.result +db.createObjectStore('storeName', null) PASS 'onsuccess' in result is true PASS 'onerror' in result is true PASS 'abort' in result is true PASS 'readyState' in result is true An event should fire shortly... +createSuccess(): Success event fired: PASS 'result' in event is true PASS 'code' in event is false @@ -42,7 +46,72 @@ PASS event.target.readyState is event.target.DONE store = event.result PASS store.name is "storeName" -PASS store.keyPath is "keyPath" +PASS store.keyPath is null +store.add('value', 'key') +PASS 'onsuccess' in result is true +PASS 'onerror' in result is true +PASS 'abort' in result is true +PASS 'readyState' in result is true +An event should fire shortly... + +addSuccess(): +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 'abort' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result is "key" +store = event.source +store.get('key') +PASS 'onsuccess' in result is true +PASS 'onerror' in result is true +PASS 'abort' in result is true +PASS 'readyState' in result is true +An event should fire shortly... + +getSuccess(): +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 'abort' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result is "value" +store = event.source +store.remove('key') +PASS 'onsuccess' in result is true +PASS 'onerror' in result is true +PASS 'abort' in result is true +PASS 'readyState' in result is true +An event should fire shortly... + +removeSuccess(): +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 'abort' in event.target is true +PASS 'readyState' in event.target is true +PASS event.target.readyState is event.target.DONE + +PASS event.result is null PASS successfullyParsed is true TEST COMPLETE diff --git a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js b/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js index 031ece6..045db12 100644 --- a/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js +++ b/LayoutTests/storage/indexeddb/script-tests/idb-objectstore-request.js @@ -4,7 +4,7 @@ if (window.layoutTestController) function test() { - result = indexedDB.open('name', 'description'); + result = evalAndLog("indexedDB.open('name', 'description')"); verifyResult(result); result.onsuccess = openSuccess; result.onerror = unexpectedErrorCallback; @@ -12,17 +12,14 @@ function test() function openSuccess() { + debug("openSuccess():"); verifySuccessEvent(event); - var db = evalAndLog("db = event.result"); - createObjectStore(db); -} -function createObjectStore(db) -{ // FIXME: remove any previously created object stores. // This requires IDBDatabaseRequest::removeObjectStore to be implemented. - result = db.createObjectStore('storeName', 'keyPath'); + + result = evalAndLog("db.createObjectStore('storeName', null)"); verifyResult(result); result.onsuccess = createSuccess; result.onerror = unexpectedErrorCallback; @@ -30,12 +27,51 @@ function createObjectStore(db) function createSuccess() { + debug("createSuccess():"); verifySuccessEvent(event); var store = evalAndLog("store = event.result"); + shouldBeEqualToString("store.name", "storeName"); - shouldBeEqualToString("store.keyPath", "keyPath"); + shouldBeNull("store.keyPath"); // FIXME: test store.indexNames, as well as all object store's methods. + result = evalAndLog("store.add('value', 'key')"); + verifyResult(result); + result.onsuccess = addSuccess; + result.onerror = unexpectedErrorCallback; +} + +function addSuccess() +{ + debug("addSuccess():"); + verifySuccessEvent(event); + shouldBeEqualToString("event.result", "key"); + var store = evalAndLog("store = event.source"); + + result = evalAndLog("store.get('key')"); + verifyResult(result); + result.onsuccess = getSuccess; + result.onerror = unexpectedErrorCallback; +} + +function getSuccess() +{ + debug("getSuccess():"); + verifySuccessEvent(event); + shouldBeEqualToString("event.result", "value"); + var store = evalAndLog("store = event.source"); + + result = evalAndLog("store.remove('key')"); + verifyResult(result); + result.onsuccess = removeSuccess; + result.onerror = unexpectedErrorCallback; +} + +function removeSuccess() +{ + debug("removeSuccess():"); + verifySuccessEvent(event); + shouldBeNull("event.result"); done(); } -- cgit v1.1