From dcc8cf2e65d1aa555cce12431a16547e66b469ee Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 27 Apr 2010 16:31:00 +0100 Subject: Merge webkit.org at r58033 : Initial merge by git Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1 --- .../touch/basic-multi-touch-events-expected.txt | 8 ++ .../touch/basic-single-touch-events-expected.txt | 14 +++- .../touch/script-tests/basic-multi-touch-events.js | 2 + .../script-tests/basic-single-touch-events.js | 6 +- .../touch/script-tests/send-oncancel-event.js | 1 - .../fast/events/touch/script-tests/touch-target.js | 97 ++++++++++++++++++++++ .../fast/events/touch/touch-target-expected.txt | 25 ++++++ LayoutTests/fast/events/touch/touch-target.html | 14 ++++ .../fast/js/resources/getOwnPropertyDescriptor.js | 3 + .../fast/js/resources/js-test-post-async.js | 5 ++ LayoutTests/fast/js/resources/js-test-post.js | 15 +++- LayoutTests/fast/js/resources/js-test-pre.js | 14 ++-- LayoutTests/http/conf/apache2-debian-httpd.conf | 10 +++ LayoutTests/http/conf/apache2-httpd.conf | 6 ++ LayoutTests/http/conf/cygwin-httpd.conf | 4 + LayoutTests/http/conf/fedora-httpd.conf | 6 ++ LayoutTests/http/conf/httpd.conf | 4 + LayoutTests/http/conf/mime.types | 1 + .../http/tests/appcache/top-frame-2-expected.txt | 1 - LayoutTests/http/tests/appcache/top-frame-2.html | 25 +++++- .../http/tests/appcache/top-frame-3-expected.txt | 2 - LayoutTests/http/tests/appcache/top-frame-3.html | 29 ++++++- .../http/tests/appcache/top-frame-4-expected.txt | 2 - LayoutTests/http/tests/appcache/top-frame-4.html | 29 ++++++- .../storage/database-lock-after-reload.html | 34 ++++---- ...cutesql-accepts-only-one-statement-expected.txt | 3 + .../executesql-accepts-only-one-statement.html | 78 +++++++++++++++++ .../open-database-creation-callback-expected.txt | 2 + ...e-creation-callback-isolated-world-expected.txt | 4 + ...-database-creation-callback-isolated-world.html | 46 ++++++++++ .../storage/open-database-creation-callback.html | 90 ++++++++++++++++++++ .../storage/open-database-over-quota-expected.txt | 2 + LayoutTests/storage/open-database-over-quota.html | 24 ++++++ .../resources/database-lock-after-reload-2.html | 18 ++-- .../storage/statement-error-callback-expected.txt | 5 +- ...ment-error-callback-isolated-world-expected.txt | 4 + .../statement-error-callback-isolated-world.html | 52 ++++++++++++ LayoutTests/storage/statement-error-callback.html | 81 +++++++++--------- ...nt-success-callback-isolated-world-expected.txt | 4 + .../statement-success-callback-isolated-world.html | 52 ++++++++++++ ...ransaction-callback-isolated-world-expected.txt | 4 + .../transaction-callback-isolated-world.html | 48 +++++++++++ ...tion-error-callback-isolated-world-expected.txt | 4 + .../transaction-error-callback-isolated-world.html | 52 ++++++++++++ 44 files changed, 830 insertions(+), 100 deletions(-) create mode 100644 LayoutTests/fast/events/touch/script-tests/touch-target.js create mode 100644 LayoutTests/fast/events/touch/touch-target-expected.txt create mode 100644 LayoutTests/fast/events/touch/touch-target.html create mode 100644 LayoutTests/fast/js/resources/js-test-post-async.js create mode 100644 LayoutTests/storage/executesql-accepts-only-one-statement-expected.txt create mode 100644 LayoutTests/storage/executesql-accepts-only-one-statement.html create mode 100644 LayoutTests/storage/open-database-creation-callback-expected.txt create mode 100644 LayoutTests/storage/open-database-creation-callback-isolated-world-expected.txt create mode 100644 LayoutTests/storage/open-database-creation-callback-isolated-world.html create mode 100644 LayoutTests/storage/open-database-creation-callback.html create mode 100644 LayoutTests/storage/open-database-over-quota-expected.txt create mode 100644 LayoutTests/storage/open-database-over-quota.html create mode 100644 LayoutTests/storage/statement-error-callback-isolated-world-expected.txt create mode 100644 LayoutTests/storage/statement-error-callback-isolated-world.html create mode 100644 LayoutTests/storage/statement-success-callback-isolated-world-expected.txt create mode 100644 LayoutTests/storage/statement-success-callback-isolated-world.html create mode 100644 LayoutTests/storage/transaction-callback-isolated-world-expected.txt create mode 100644 LayoutTests/storage/transaction-callback-isolated-world.html create mode 100644 LayoutTests/storage/transaction-error-callback-isolated-world-expected.txt create mode 100644 LayoutTests/storage/transaction-error-callback-isolated-world.html (limited to 'LayoutTests') diff --git a/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt b/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt index 67db8dc..9f83f8f 100644 --- a/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt +++ b/LayoutTests/fast/events/touch/basic-multi-touch-events-expected.txt @@ -9,6 +9,8 @@ PASS lastEvent.type is "touchstart" PASS lastEvent.touches.length is 2 PASS lastEvent.changedTouches.length is 2 PASS lastEvent.targetTouches.length is 2 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.touches[0].pageX is 10 PASS lastEvent.touches[0].pageY is 10 PASS lastEvent.touches[0].clientX is 10 @@ -44,6 +46,8 @@ PASS lastEvent.type is "touchmove" PASS lastEvent.touches.length is 2 PASS lastEvent.changedTouches.length is 1 PASS lastEvent.targetTouches.length is 2 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.touches[0].pageX is 15 PASS lastEvent.touches[0].pageY is 15 PASS lastEvent.touches[0].clientX is 15 @@ -64,6 +68,8 @@ PASS lastEvent.type is "touchend" PASS lastEvent.touches.length is 1 PASS lastEvent.changedTouches.length is 1 PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.touches[0].pageX is 20 PASS lastEvent.touches[0].pageY is 30 PASS lastEvent.touches[0].clientX is 20 @@ -84,6 +90,8 @@ PASS lastEvent.type is "touchend" PASS lastEvent.touches.length is 0 PASS lastEvent.changedTouches.length is 1 PASS lastEvent.targetTouches.length is 0 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.changedTouches[0].pageX is 20 PASS lastEvent.changedTouches[0].pageY is 30 PASS lastEvent.changedTouches[0].clientX is 20 diff --git a/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt b/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt index 634faa1..ec168cb 100644 --- a/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt +++ b/LayoutTests/fast/events/touch/basic-single-touch-events-expected.txt @@ -7,6 +7,8 @@ PASS lastEvent.type is "touchstart" PASS lastEvent.touches.length is 1 PASS lastEvent.changedTouches.length is 1 PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.shiftKey is false PASS lastEvent.touches[0].target.id is "touchtarget" PASS lastEvent.touches[0].pageX is 10 @@ -28,6 +30,8 @@ PASS lastEvent.type is "touchmove" PASS lastEvent.touches.length is 1 PASS lastEvent.changedTouches.length is 1 PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.touches[0].pageX is 20 PASS lastEvent.touches[0].pageY is 15 PASS lastEvent.touches[0].clientX is 20 @@ -41,6 +45,8 @@ PASS lastEvent.type is "touchend" PASS lastEvent.touches.length is 0 PASS lastEvent.changedTouches.length is 1 PASS lastEvent.targetTouches.length is 0 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.changedTouches[0].pageX is 20 PASS lastEvent.changedTouches[0].pageY is 15 PASS lastEvent.changedTouches[0].clientX is 20 @@ -52,12 +58,16 @@ PASS lastEvent.type is "touchstart" PASS lastEvent.touches.length is 1 PASS lastEvent.changedTouches.length is 1 PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 PASS lastEvent.targetTouches[0].target.tagName is "DIV" PASS lastEvent.type is "touchmove" PASS lastEvent.touches.length is 1 PASS lastEvent.changedTouches.length is 1 -PASS lastEvent.targetTouches.length is 0 -PASS lastEvent.touches[0].target.tagName is "HTML" +PASS lastEvent.targetTouches.length is 1 +PASS lastEvent.pageX is 0 +PASS lastEvent.pageY is 0 +PASS lastEvent.touches[0].target.tagName is "DIV" PASS successfullyParsed is true TEST COMPLETE diff --git a/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js index abfaf90..579c073 100644 --- a/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js +++ b/LayoutTests/fast/events/touch/script-tests/basic-multi-touch-events.js @@ -37,6 +37,8 @@ function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchC shouldBe("lastEvent.touches.length", totalTouchCount.toString()); shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); + shouldBe("lastEvent.pageX", "0"); + shouldBe("lastEvent.pageY", "0"); } function verifyTouchPoint(list, point, x, y, id) diff --git a/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js b/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js index ca99d83..9975c87 100644 --- a/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js +++ b/LayoutTests/fast/events/touch/script-tests/basic-single-touch-events.js @@ -37,6 +37,8 @@ function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchC shouldBe("lastEvent.touches.length", totalTouchCount.toString()); shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString()); shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString()); + shouldBe("lastEvent.pageX", "0"); + shouldBe("lastEvent.pageY", "0"); } function verifyTouchPoint(list, point, x, y, id) @@ -77,8 +79,8 @@ function verifyTouch(which) { shouldBeEqualToString("lastEvent.targetTouches[0].target.tagName", "DIV"); break; case 4: - verifyTouchEvent("touchmove", 1, 1, 0); - shouldBeEqualToString("lastEvent.touches[0].target.tagName", "HTML"); + verifyTouchEvent("touchmove", 1, 1, 1); + shouldBeEqualToString("lastEvent.touches[0].target.tagName", "DIV"); break; default: testFailed("Wrong number of touch events! (" + which + ")"); diff --git a/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js b/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js index c83daa4..01eac2f 100644 --- a/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js +++ b/LayoutTests/fast/events/touch/script-tests/send-oncancel-event.js @@ -13,7 +13,6 @@ function touchcancelHandler() { shouldBe("cancelEvent.pageY", touchY.toString()); if (window.layoutTestController) { layoutTestController.notifyDone(); - isSuccessfullyParsed(); } } diff --git a/LayoutTests/fast/events/touch/script-tests/touch-target.js b/LayoutTests/fast/events/touch/script-tests/touch-target.js new file mode 100644 index 0000000..0623811 --- /dev/null +++ b/LayoutTests/fast/events/touch/script-tests/touch-target.js @@ -0,0 +1,97 @@ +var div1 = document.createElement("div"); +div1.id = "targetA"; +div1.style.width = "100px"; +div1.style.height = "100px"; +div1.style.backgroundColor = "blue"; + +var div2 = document.createElement("div"); +div2.id = "targetB"; +div2.style.width = "100px"; +div2.style.height = "100px"; +div2.style.backgroundColor = "green"; + +var touchStartCount = 0; +var touchMoveCount = 0; + +document.getElementById('targetsDiv').appendChild(div1); +document.getElementById('targetsDiv').appendChild(document.createElement('br')); +document.getElementById('targetsDiv').appendChild(div2); + +function touchStartHandler() +{ + shouldBeEqualToString('event.type', 'touchstart'); + switch (touchStartCount) { + case 0: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 1: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + + touchStartCount++; +} + +function touchMoveHandler() +{ + shouldBeEqualToString('event.type', 'touchmove'); + switch (touchMoveCount) { + case 0: + case 1: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 2: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + + if (++touchMoveCount == 3) + { + successfullyParsed = true; + layoutTestController.notifyDone(); + isSuccessfullyParsed(); + } +} + +div1.addEventListener("touchstart", touchStartHandler, false); +div1.addEventListener("touchmove", touchMoveHandler, false); + +div2.addEventListener("touchstart", touchStartHandler, false); +div2.addEventListener("touchmove", touchMoveHandler, false); + +description("Tests that the target of touches match the element where the event originated, not where the touch is currently occurring."); + +if (window.layoutTestController) { + layoutTestController.waitUntilDone(); +} + +if (window.eventSender) { + eventSender.clearTouchPoints(); + eventSender.addTouchPoint(50, 150); + eventSender.addTouchPoint(50, 250); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 50, 250); + eventSender.updateTouchPoint(1, 50, 150); + eventSender.touchMove(); + + eventSender.updateTouchPoint(0, 1000, 1000); + eventSender.updateTouchPoint(1, 1000, 1000); + eventSender.touchMove(); + + eventSender.releaseTouchPoint(0); + eventSender.touchEnd(); + + eventSender.addTouchPoint(50,150); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 500, 500); + eventSender.updateTouchPoint(1, 500, 500); + eventSender.touchMove(); +} else + debug('This test requires DRT.'); + diff --git a/LayoutTests/fast/events/touch/touch-target-expected.txt b/LayoutTests/fast/events/touch/touch-target-expected.txt new file mode 100644 index 0000000..60a4c37 --- /dev/null +++ b/LayoutTests/fast/events/touch/touch-target-expected.txt @@ -0,0 +1,25 @@ +Tests that the target of touches match the element where the event originated, not where the touch is currently occurring. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +PASS event.type is "touchstart" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.type is "touchstart" +PASS event.touches[0].target.id is "targetB" +PASS event.touches[1].target.id is "targetA" +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetB" +PASS event.touches[1].target.id is "targetA" +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/events/touch/touch-target.html b/LayoutTests/fast/events/touch/touch-target.html new file mode 100644 index 0000000..dfd8dab --- /dev/null +++ b/LayoutTests/fast/events/touch/touch-target.html @@ -0,0 +1,14 @@ + + + + + + + + +

+
+
+ + + diff --git a/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js b/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js index 880aed4..eb01411 100644 --- a/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js +++ b/LayoutTests/fast/js/resources/getOwnPropertyDescriptor.js @@ -39,6 +39,9 @@ descriptorShouldBe("Math.sin", "'length'", {writable: false, enumerable: false, descriptorShouldBe("Math.sin", "'name'", {writable: false, enumerable: false, configurable: false, value:"'sin'"}); var global = this; descriptorShouldBe("global", "'global'", {writable: true, enumerable: true, configurable: false, value:"global"}); +descriptorShouldBe("global", "'undefined'", {writable: false, enumerable: false, configurable: false, value:"undefined"}); +descriptorShouldBe("global", "'NaN'", {writable: false, enumerable: false, configurable: false, value:"NaN"}); +descriptorShouldBe("global", "'Infinity'", {writable: false, enumerable: false, configurable: false, value:"Infinity"}); descriptorShouldBe("global", "'window'", {writable: false, enumerable: true, configurable: false, value:"global"}); descriptorShouldBe("global", "'XMLHttpRequest'", {writable: true, enumerable: true, configurable: false, value:"XMLHttpRequest"}); descriptorShouldBe("global", "'length'", {writable: true, enumerable: true, configurable: false, value:"global.length"}); diff --git a/LayoutTests/fast/js/resources/js-test-post-async.js b/LayoutTests/fast/js/resources/js-test-post-async.js new file mode 100644 index 0000000..76777aa --- /dev/null +++ b/LayoutTests/fast/js/resources/js-test-post-async.js @@ -0,0 +1,5 @@ +shouldBeTrue("successfullyParsed"); +debug('
TEST COMPLETE'); + +if (window.layoutTestController) + layoutTestController.notifyDone(); diff --git a/LayoutTests/fast/js/resources/js-test-post.js b/LayoutTests/fast/js/resources/js-test-post.js index 6d8a68f..88882c5 100644 --- a/LayoutTests/fast/js/resources/js-test-post.js +++ b/LayoutTests/fast/js/resources/js-test-post.js @@ -1,2 +1,13 @@ -shouldBeTrue("successfullyParsed"); -debug('
TEST COMPLETE'); +function finishJSTest() +{ + shouldBeTrue("successfullyParsed"); + debug('
TEST COMPLETE'); + if (window.jsTestIsAsync && window.layoutTestController) + layoutTestController.notifyDone(); +} + +if (window.jsTestIsAsync) { + if (window.layoutTestController) + layoutTestController.waitUntilDone(); +} else + finishJSTest(); diff --git a/LayoutTests/fast/js/resources/js-test-pre.js b/LayoutTests/fast/js/resources/js-test-pre.js index b91812f..ecf5fd0 100644 --- a/LayoutTests/fast/js/resources/js-test-pre.js +++ b/LayoutTests/fast/js/resources/js-test-pre.js @@ -37,11 +37,15 @@ function testFailed(msg) function areArraysEqual(_a, _b) { - if (_a.length !== _b.length) - return false; - for (var i = 0; i < _a.length; i++) - if (_a[i] !== _b[i]) + try { + if (_a.length !== _b.length) return false; + for (var i = 0; i < _a.length; i++) + if (_a[i] !== _b[i]) + return false; + } catch (ex) { + return false; + } return true; } @@ -118,7 +122,7 @@ function shouldBeNull(_a) { shouldBe(_a, "null"); } function shouldBeEqualToString(a, b) { - var unevaledString = '"' + b.replace(/"/g, "\"") + '"'; + var unevaledString = '"' + b.replace(/\\/g, "\\\\").replace(/"/g, "\"") + '"'; shouldBe(a, unevaledString); } diff --git a/LayoutTests/http/conf/apache2-debian-httpd.conf b/LayoutTests/http/conf/apache2-debian-httpd.conf index 03aa9c8..b8918db 100644 --- a/LayoutTests/http/conf/apache2-debian-httpd.conf +++ b/LayoutTests/http/conf/apache2-debian-httpd.conf @@ -163,6 +163,16 @@ MaxRequestsPerChild 100000 #Listen 3000 Listen 127.0.0.1:8080 Listen 127.0.0.1:8443 +# We listen to both IPv4 and IPv6 loop-back addresses, but ignore +# requests to 8000 from random users on network. +# See https://bugs.webkit.org/show_bug.cgi?id=37104 +# FIXME: This breaks the GTK-Debug and Chromium-Linux bots. +# Starting up apache fails on this line with a syntax error. +# Need a way to detect if the machine supports ipv6 and then +# only do this binding in that case. +#Listen [::1]:8000 +#Listen [::1]:8080 +#Listen [::1]:8443 # # Dynamic Shared Object (DSO) Support diff --git a/LayoutTests/http/conf/apache2-httpd.conf b/LayoutTests/http/conf/apache2-httpd.conf index 980e4e2..e915fa7 100644 --- a/LayoutTests/http/conf/apache2-httpd.conf +++ b/LayoutTests/http/conf/apache2-httpd.conf @@ -163,6 +163,12 @@ MaxRequestsPerChild 100000 #Listen 3000 Listen 127.0.0.1:8080 Listen 127.0.0.1:8443 +# We listen to both IPv4 and IPv6 loop-back addresses, but ignore +# requests to 8000 from random users on network. +# See https://bugs.webkit.org/show_bug.cgi?id=37104 +Listen [::1]:8000 +Listen [::1]:8080 +Listen [::1]:8443 # # Dynamic Shared Object (DSO) Support diff --git a/LayoutTests/http/conf/cygwin-httpd.conf b/LayoutTests/http/conf/cygwin-httpd.conf index a79ed39..1651912 100644 --- a/LayoutTests/http/conf/cygwin-httpd.conf +++ b/LayoutTests/http/conf/cygwin-httpd.conf @@ -179,6 +179,10 @@ MaxRequestsPerChild 100000 # #Listen 3000 Listen 127.0.0.1:8080 +# Apache 1.3 only supports IPv4, so we do not listen on ::1 (IPv6 loopback). +# This may cause flaky tests on systems which support IPv6 if localhost resolves +# to ::1 in addition to 127.0.0.1. +# See https://bugs.webkit.org/show_bug.cgi?id=37104 # # Dynamic Shared Object (DSO) Support diff --git a/LayoutTests/http/conf/fedora-httpd.conf b/LayoutTests/http/conf/fedora-httpd.conf index cd71d88..62100c8 100644 --- a/LayoutTests/http/conf/fedora-httpd.conf +++ b/LayoutTests/http/conf/fedora-httpd.conf @@ -138,6 +138,12 @@ MaxRequestsPerChild 100000 #Listen 12.34.56.78:80 Listen 127.0.0.1:8080 Listen 127.0.0.1:8443 +# We listen to both IPv4 and IPv6 loop-back addresses, but ignore +# requests to 8000 from random users on network. +# See https://bugs.webkit.org/show_bug.cgi?id=37104 +Listen [::1]:8000 +Listen [::1]:8080 +Listen [::1]:8443 # # Dynamic Shared Object (DSO) Support diff --git a/LayoutTests/http/conf/httpd.conf b/LayoutTests/http/conf/httpd.conf index ec04c73..6e6157c 100644 --- a/LayoutTests/http/conf/httpd.conf +++ b/LayoutTests/http/conf/httpd.conf @@ -181,6 +181,10 @@ MaxRequestsPerChild 100000 #Listen 3000 Listen 127.0.0.1:8080 Listen 127.0.0.1:8443 +# Apache 1.3 only supports IPv4, so we do not listen on ::1 (IPv6 loopback). +# This may cause flaky tests on systems which support IPv6 if localhost resolves +# to ::1 in addition to 127.0.0.1. +# See https://bugs.webkit.org/show_bug.cgi?id=37104 # # Dynamic Shared Object (DSO) Support diff --git a/LayoutTests/http/conf/mime.types b/LayoutTests/http/conf/mime.types index cfb9d53..0489350 100644 --- a/LayoutTests/http/conf/mime.types +++ b/LayoutTests/http/conf/mime.types @@ -324,6 +324,7 @@ application/vnd.vividence.scriptfile application/vnd.vsf application/vnd.wap.sic application/vnd.wap.slc +application/vnd.wap.xhtml+xml xhtmlmp application/vnd.wap.wbxml wbxml application/vnd.wap.wmlc wmlc application/vnd.wap.wmlscriptc wmlsc diff --git a/LayoutTests/http/tests/appcache/top-frame-2-expected.txt b/LayoutTests/http/tests/appcache/top-frame-2-expected.txt index 6e99bb6..41a3fe0 100644 --- a/LayoutTests/http/tests/appcache/top-frame-2-expected.txt +++ b/LayoutTests/http/tests/appcache/top-frame-2-expected.txt @@ -2,6 +2,5 @@ Test that a subframe without manifest gets picked by a relevant application cach Should say SUCCESS: -checking SUCCESS diff --git a/LayoutTests/http/tests/appcache/top-frame-2.html b/LayoutTests/http/tests/appcache/top-frame-2.html index c239d08..71bd468 100644 --- a/LayoutTests/http/tests/appcache/top-frame-2.html +++ b/LayoutTests/http/tests/appcache/top-frame-2.html @@ -16,13 +16,34 @@ function log(message) document.getElementById("result").innerHTML += message + "
"; } +function debug(message) +{ + // If running manually in the browser, print the sequence of events. + if (!window.layoutTestController) + log(message); +} + +var receivedExpectedMessage = false; +var receivedCheckingEvent = false; +var receivedNoupdateEvent = false; + +function checkDone() +{ + if (receivedExpectedMessage && receivedCheckingEvent && receivedNoupdateEvent) { + log("SUCCESS"); + if (window.layoutTestController) + layoutTestController.notifyDone(); + } +} + function test() { applicationCache.onnoupdate = null; applicationCache.oncached = null; // When a new main resource is associated with the cache, an update should be started. - applicationCache.onchecking = function() { log("checking") } + applicationCache.onchecking = function() { debug("checking"); receivedCheckingEvent = true; checkDone(); } + applicationCache.onnoupdate = function() { debug("noupdate"); receivedNoupdateEvent = true; checkDone(); } var ifr = document.createElement("iframe"); ifr.setAttribute("src", "resources/subframe-2.html"); @@ -35,7 +56,7 @@ applicationCache.oncached = function() { test() } applicationCache.onupdateready = function() { log("FAIL: received unexpected updateready event") } applicationCache.onerror = function() { log("FAIL: received unexpected error event") } -window.addEventListener("message", function() { log("SUCCESS"); if (window.layoutTestController) layoutTestController.notifyDone() }, false); +window.addEventListener("message", function() { debug("message"); receivedExpectedMessage = true; checkDone(); }, false); diff --git a/LayoutTests/http/tests/appcache/top-frame-3-expected.txt b/LayoutTests/http/tests/appcache/top-frame-3-expected.txt index a10dbee..a1245cb 100644 --- a/LayoutTests/http/tests/appcache/top-frame-3-expected.txt +++ b/LayoutTests/http/tests/appcache/top-frame-3-expected.txt @@ -4,7 +4,5 @@ In this case, the subframe resource is NOT listed in manifest explicitly. Should say SUCCESS: -checking -checking SUCCESS diff --git a/LayoutTests/http/tests/appcache/top-frame-3.html b/LayoutTests/http/tests/appcache/top-frame-3.html index 9fc9dde..a2d2cc6 100644 --- a/LayoutTests/http/tests/appcache/top-frame-3.html +++ b/LayoutTests/http/tests/appcache/top-frame-3.html @@ -16,13 +16,34 @@ function log(message) document.getElementById("result").innerHTML += message + "
"; } +function debug(message) +{ + // If running manually in the browser, print the sequence of events. + if (!window.layoutTestController) + log(message); +} + +var receivedExpectedMessage = false; +var receivedCheckingEventsCounter = 0; +var receivedNoupdateEventsCounter = 0; + +function checkDone() +{ + if (receivedExpectedMessage && receivedCheckingEventsCounter == 2 && receivedNoupdateEventsCounter == 2) { + log("SUCCESS"); + if (window.layoutTestController) + layoutTestController.notifyDone(); + } +} + function test() { applicationCache.onnoupdate = null; applicationCache.oncached = null; // When a new main resource is associated with the cache, an update should be started. - applicationCache.onchecking = function() { log("checking") } + applicationCache.onchecking = function() { debug("checking"); receivedCheckingEventsCounter++; checkDone() } + applicationCache.onnoupdate = function() { debug("noupdate"); receivedNoupdateEventsCounter++; checkDone(); } var ifr = document.createElement("iframe"); ifr.setAttribute("src", "resources/subframe-3.html"); @@ -42,9 +63,9 @@ function test2() function test3() { - log("SUCCESS"); - if (window.layoutTestController) - layoutTestController.notifyDone(); + debug("message"); + receivedExpectedMessage = true; + checkDone(); } applicationCache.onnoupdate = function() { test() } diff --git a/LayoutTests/http/tests/appcache/top-frame-4-expected.txt b/LayoutTests/http/tests/appcache/top-frame-4-expected.txt index 43bfd43..e748160 100644 --- a/LayoutTests/http/tests/appcache/top-frame-4-expected.txt +++ b/LayoutTests/http/tests/appcache/top-frame-4-expected.txt @@ -4,7 +4,5 @@ In this case, the subframe resource is listed in manifest explicitly. Should say SUCCESS: -checking -checking SUCCESS diff --git a/LayoutTests/http/tests/appcache/top-frame-4.html b/LayoutTests/http/tests/appcache/top-frame-4.html index 39743b9..c36e0a3 100644 --- a/LayoutTests/http/tests/appcache/top-frame-4.html +++ b/LayoutTests/http/tests/appcache/top-frame-4.html @@ -16,13 +16,34 @@ function log(message) document.getElementById("result").innerHTML += message + "
"; } +function debug(message) +{ + // If running manually in the browser, print the sequence of events. + if (!window.layoutTestController) + log(message); +} + +var receivedExpectedMessage = false; +var receivedCheckingEventsCounter = 0; +var receivedNoupdateEventsCounter = 0; + +function checkDone() +{ + if (receivedExpectedMessage && receivedCheckingEventsCounter == 2 && receivedNoupdateEventsCounter == 2) { + log("SUCCESS"); + if (window.layoutTestController) + layoutTestController.notifyDone(); + } +} + function test() { applicationCache.onnoupdate = null; applicationCache.oncached = null; // When a new main resource is associated with the cache, an update should be started. - applicationCache.onchecking = function() { log("checking") } + applicationCache.onchecking = function() { debug("checking"); receivedCheckingEventsCounter++; checkDone() } + applicationCache.onnoupdate = function() { debug("noupdate"); receivedNoupdateEventsCounter++; checkDone(); } var ifr = document.createElement("iframe"); ifr.setAttribute("src", "resources/subframe-4.html"); @@ -42,9 +63,9 @@ function test2() function test3() { - log("SUCCESS"); - if (window.layoutTestController) - layoutTestController.notifyDone(); + debug("message"); + receivedExpectedMessage = true; + checkDone(); } applicationCache.onnoupdate = function() { test() } diff --git a/LayoutTests/storage/database-lock-after-reload.html b/LayoutTests/storage/database-lock-after-reload.html index 8bdaddc..5b5989f 100644 --- a/LayoutTests/storage/database-lock-after-reload.html +++ b/LayoutTests/storage/database-lock-after-reload.html @@ -1,8 +1,6 @@ diff --git a/LayoutTests/storage/executesql-accepts-only-one-statement-expected.txt b/LayoutTests/storage/executesql-accepts-only-one-statement-expected.txt new file mode 100644 index 0000000..b95ceee --- /dev/null +++ b/LayoutTests/storage/executesql-accepts-only-one-statement-expected.txt @@ -0,0 +1,3 @@ +This test tests that executeSql() fails when called with a string that has more than one valid statement in it. +Test passed. + diff --git a/LayoutTests/storage/executesql-accepts-only-one-statement.html b/LayoutTests/storage/executesql-accepts-only-one-statement.html new file mode 100644 index 0000000..a3860c8 --- /dev/null +++ b/LayoutTests/storage/executesql-accepts-only-one-statement.html @@ -0,0 +1,78 @@ + + + + + +This test tests that executeSql() fails when called with a string that has more than one valid statement in it.
+ + + diff --git a/LayoutTests/storage/open-database-creation-callback-expected.txt b/LayoutTests/storage/open-database-creation-callback-expected.txt new file mode 100644 index 0000000..d86ab72 --- /dev/null +++ b/LayoutTests/storage/open-database-creation-callback-expected.txt @@ -0,0 +1,2 @@ +This test tests openDatabase()'s creation callback. + diff --git a/LayoutTests/storage/open-database-creation-callback-isolated-world-expected.txt b/LayoutTests/storage/open-database-creation-callback-isolated-world-expected.txt new file mode 100644 index 0000000..fa96a67 --- /dev/null +++ b/LayoutTests/storage/open-database-creation-callback-isolated-world-expected.txt @@ -0,0 +1,4 @@ +ALERT: undefined +ALERT: PASS: document.body.bar visible in a callback created in this world. +This test tests that the openDatabase() creation callback is called in the right world. + diff --git a/LayoutTests/storage/open-database-creation-callback-isolated-world.html b/LayoutTests/storage/open-database-creation-callback-isolated-world.html new file mode 100644 index 0000000..98a4664 --- /dev/null +++ b/LayoutTests/storage/open-database-creation-callback-isolated-world.html @@ -0,0 +1,46 @@ + + + +This test tests that the openDatabase() creation callback is called in the right world. +
+ + + diff --git a/LayoutTests/storage/open-database-creation-callback.html b/LayoutTests/storage/open-database-creation-callback.html new file mode 100644 index 0000000..ac24942 --- /dev/null +++ b/LayoutTests/storage/open-database-creation-callback.html @@ -0,0 +1,90 @@ + + + + + + +This test tests openDatabase()'s creation callback. +
+
+ + + diff --git a/LayoutTests/storage/open-database-over-quota-expected.txt b/LayoutTests/storage/open-database-over-quota-expected.txt new file mode 100644 index 0000000..d0c15e4 --- /dev/null +++ b/LayoutTests/storage/open-database-over-quota-expected.txt @@ -0,0 +1,2 @@ +This tests that calling openDatabase with a size over 5MB doesn't assert on debug builds. +PASS diff --git a/LayoutTests/storage/open-database-over-quota.html b/LayoutTests/storage/open-database-over-quota.html new file mode 100644 index 0000000..2a9264d --- /dev/null +++ b/LayoutTests/storage/open-database-over-quota.html @@ -0,0 +1,24 @@ + + + + + +
This tests that calling openDatabase with a size over 5MB doesn't assert on debug builds. +
+FAIL: We shouldn't have been able to open the database. +
+ + diff --git a/LayoutTests/storage/resources/database-lock-after-reload-2.html b/LayoutTests/storage/resources/database-lock-after-reload-2.html index d73a0df..6e0f09c 100644 --- a/LayoutTests/storage/resources/database-lock-after-reload-2.html +++ b/LayoutTests/storage/resources/database-lock-after-reload-2.html @@ -1,8 +1,6 @@ + + diff --git a/LayoutTests/storage/statement-error-callback.html b/LayoutTests/storage/statement-error-callback.html index 060a881..6db836d 100644 --- a/LayoutTests/storage/statement-error-callback.html +++ b/LayoutTests/storage/statement-error-callback.html @@ -15,37 +15,42 @@ function finishTest() } var txCallbackCount = 0; -var NUMBER_OF_TRANSACTIONS = 7; +var NUMBER_OF_TRANSACTIONS = 10; var database; -function transactionErrorFunction(error) -{ - log("PASS - the transaction error callback was invoked."); - if (++txCallbackCount == NUMBER_OF_TRANSACTIONS) - finishTest(); -} - -function transactionSuccessFunction(message) -{ - log("FAIL - the transaction success callback should not be invoked."); - if (++txCallbackCount == NUMBER_OF_TRANSACTIONS) - finishTest(); -} - -function runTransactionExpectedToFail(statementErrorCallback) +function runTransaction(expectedToFail, statementErrorCallback) { database.transaction(function(tx) { - tx.executeSql("CREATE TABLE IF NOT EXISTS StatementErrorCallbackTest (randomData)"); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test']); + tx.executeSql("CREATE TABLE IF NOT EXISTS TestTable (RandomData TEXT)"); + tx.executeSql("INSERT INTO TestTable VALUES (?)", ['test']); tx.executeSql("THIS STATEMENT WILL FAIL", [], function(tx, data) { log("FAIL - this statement should have failed"); finishTest(); }, statementErrorCallback); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test1'], - function(error) { log("FAIL - This statement should not have been executed"); }, - function() { log("FAIL - This statement should not have been executed"); }); - }, transactionErrorFunction, transactionSuccessFunction); + tx.executeSql("INSERT INTO TestTable VALUES (?)", ['test1'], + function(error) { + if (expectedToFail) + log("FAIL - This statement should not have been executed"); + }, function() { + if (expectedToFail) + log("FAIL - This statement should not have been executed"); + }); + }, function(error) { + if (expectedToFail) + log("PASS - the transaction error callback was invoked."); + else + log("FAIL - the transaction error callback should not have been invoked."); + if (++txCallbackCount == NUMBER_OF_TRANSACTIONS) + finishTest(); + }, function() { + if (expectedToFail) + log("FAIL - the transaction success callback should not have been invoked."); + else + log("PASS - the transaction success callback was invoked."); + if (++txCallbackCount == NUMBER_OF_TRANSACTIONS) + finishTest(); + }); } function runTest() @@ -56,28 +61,18 @@ function runTest() layoutTestController.waitUntilDone(); } - database = openDatabase("bug-28872", "1.0", "statement error callback test", 1024); - database.transaction(function(tx) { - tx.executeSql("CREATE TABLE IF NOT EXISTS StatementErrorCallbackTest (randomData)"); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test']); - tx.executeSql("THIS STATEMENT WILL FAIL", [], - function(tx, data) { - log("FAIL - this statement should have failed"); - finishTest(); - }, function(tx, error) { return false; }); - tx.executeSql("INSERT INTO StatementErrorCallbackTest (randomData) VALUES (?)", ['test1'], - function(tx, data) { }, - function(tx, error) { log("FAIL - This statement should not have caused an error"); }); - }, function(error) { log("FAIL - The transaction error callback should not have been invoked"); }, - function() { }); + database = openDatabase("StatementErrorCallbackTest", "1.0", "statement error callback test", 1024); - runTransactionExpectedToFail(function(error) { return true; }); - runTransactionExpectedToFail(function(error) { throw "Exception in statement error callback"; return false; }); - runTransactionExpectedToFail(function(error) {}); - runTransactionExpectedToFail(function(error) { return null; }); - runTransactionExpectedToFail(function(error) { return "some string"; }); - runTransactionExpectedToFail(function(error) { return 1234; }); - runTransactionExpectedToFail(function(error) { return {a: 2, b: "abc"}; }); + runTransaction(true, function(error) { return true; }); + runTransaction(true, function(error) { throw "Exception in statement error callback"; return false; }); + runTransaction(true, function(error) { return "some string"; }); + runTransaction(true, function(error) { return 1234; }); + runTransaction(true, function(error) { return {a: 2, b: "abc"}; }); + runTransaction(true, function(error) { return "false"; }); + runTransaction(false, function(error) {}); + runTransaction(false, function(error) { return false; }); + runTransaction(false, function(error) { return 0; }); + runTransaction(false, function(error) { return null; }); } diff --git a/LayoutTests/storage/statement-success-callback-isolated-world-expected.txt b/LayoutTests/storage/statement-success-callback-isolated-world-expected.txt new file mode 100644 index 0000000..2ef027d --- /dev/null +++ b/LayoutTests/storage/statement-success-callback-isolated-world-expected.txt @@ -0,0 +1,4 @@ +ALERT: undefined +ALERT: PASS: document.body.bar visible in a callback created in this world. +This test tests that the statement success callback is called in the right world. + diff --git a/LayoutTests/storage/statement-success-callback-isolated-world.html b/LayoutTests/storage/statement-success-callback-isolated-world.html new file mode 100644 index 0000000..4fac754 --- /dev/null +++ b/LayoutTests/storage/statement-success-callback-isolated-world.html @@ -0,0 +1,52 @@ + + + +This test tests that the statement success callback is called in the right world. +
+ + + diff --git a/LayoutTests/storage/transaction-callback-isolated-world-expected.txt b/LayoutTests/storage/transaction-callback-isolated-world-expected.txt new file mode 100644 index 0000000..27f474f --- /dev/null +++ b/LayoutTests/storage/transaction-callback-isolated-world-expected.txt @@ -0,0 +1,4 @@ +ALERT: undefined +ALERT: PASS: document.body.bar visible in a callback created in this world. +This test tests that the transaction callback is called in the right world. + diff --git a/LayoutTests/storage/transaction-callback-isolated-world.html b/LayoutTests/storage/transaction-callback-isolated-world.html new file mode 100644 index 0000000..6825d70 --- /dev/null +++ b/LayoutTests/storage/transaction-callback-isolated-world.html @@ -0,0 +1,48 @@ + + + +This test tests that the transaction callback is called in the right world. +
+ + + diff --git a/LayoutTests/storage/transaction-error-callback-isolated-world-expected.txt b/LayoutTests/storage/transaction-error-callback-isolated-world-expected.txt new file mode 100644 index 0000000..da15396 --- /dev/null +++ b/LayoutTests/storage/transaction-error-callback-isolated-world-expected.txt @@ -0,0 +1,4 @@ +ALERT: undefined +ALERT: PASS: document.body.bar visible in a callback created in this world. +This test tests that the transaction error callback is called in the right world. + diff --git a/LayoutTests/storage/transaction-error-callback-isolated-world.html b/LayoutTests/storage/transaction-error-callback-isolated-world.html new file mode 100644 index 0000000..521894d --- /dev/null +++ b/LayoutTests/storage/transaction-error-callback-isolated-world.html @@ -0,0 +1,52 @@ + + + +This test tests that the transaction error callback is called in the right world. +
+ + + -- cgit v1.1