From 2bde8e466a4451c7319e3a072d118917957d6554 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 25 May 2011 19:08:45 +0100 Subject: Merge WebKit at r82507: Initial merge by git Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e --- ...-reload-cancel-permission-requests-expected.txt | 10 +++++ .../page-reload-cancel-permission-requests.html | 13 +++++++ ...ge-reload-cancel-permission-requests-inner.html | 7 ++++ .../Geolocation/resources/window-close-popup.html | 4 +- .../page-reload-cancel-permission-requests.js | 44 +++++++++++++++++++++ .../Geolocation/script-tests/window-close-crash.js | 6 --- .../invalid-form-field-expected.txt | 5 +++ .../dom/HTMLFormElement/invalid-form-field.html | 45 ++++++++++++++++++++++ .../move-option-between-documents-expected.txt | 5 +++ .../move-option-between-documents.html | 45 ++++++++++++++++++++++ .../prefetch-beforeload-expected.txt | 2 + .../dom/HTMLLinkElement/prefetch-beforeload.html | 14 +++++++ .../HTMLLinkElement/prefetch-onerror-expected.txt | 6 +++ .../fast/dom/HTMLLinkElement/prefetch-onerror.html | 25 ++++++++++++ .../encoding/dumpAsText/utf-16-no-bom-expected.txt | 1 - .../js-constructors-use-correct-global.js | 16 ++++++++ 16 files changed, 238 insertions(+), 10 deletions(-) create mode 100644 LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests-expected.txt create mode 100644 LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests.html create mode 100644 LayoutTests/fast/dom/Geolocation/resources/page-reload-cancel-permission-requests-inner.html create mode 100644 LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js create mode 100644 LayoutTests/fast/dom/HTMLFormElement/invalid-form-field-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLFormElement/invalid-form-field.html create mode 100644 LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload.html create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror-expected.txt create mode 100644 LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror.html create mode 100644 LayoutTests/fast/js/resources/js-constructors-use-correct-global.js (limited to 'LayoutTests/fast') diff --git a/LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests-expected.txt b/LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests-expected.txt new file mode 100644 index 0000000..c7f2d2b --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests-expected.txt @@ -0,0 +1,10 @@ +Tests that when a page is reloaded, the frame is properly detached from the Geolocation object to ensure that no permission requests are in progress. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS numPendingRequests is 0 +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests.html b/LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests.html new file mode 100644 index 0000000..5b6aa5c --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + diff --git a/LayoutTests/fast/dom/Geolocation/resources/page-reload-cancel-permission-requests-inner.html b/LayoutTests/fast/dom/Geolocation/resources/page-reload-cancel-permission-requests-inner.html new file mode 100644 index 0000000..4a4a715 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/resources/page-reload-cancel-permission-requests-inner.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html b/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html index cfeabae..5370b4c 100644 --- a/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html +++ b/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html @@ -11,9 +11,7 @@ function loadNext() { layoutTestController.setMockGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy); } - navigator.geolocation.watchPosition( - function(p) { window.opener.gotPosition(); }, - function(e) { window.opener.failedToCreateWatch(e); }); + navigator.geolocation.watchPosition(window.opener.gotPosition); } diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js b/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js new file mode 100644 index 0000000..7ac291b --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/script-tests/page-reload-cancel-permission-requests.js @@ -0,0 +1,44 @@ +description("Tests that when a page is reloaded, the frame is properly detached from the Geolocation object " + + "to ensure that no permission requests are in progress."); + +window.jsTestIsAsync = true; + +var numPendingRequests; +var isReload = false; + +if ("#reload" == location.hash) + isReload = true; + +if (window.layoutTestController) { + numPendingRequests = layoutTestController.numberOfPendingGeolocationPermissionRequests(); + shouldBe('numPendingRequests', '0'); + + if (isReload) + finishJSTest(); +} + +if (!isReload) { + // Kick off a position request and then reload the page, this should set up + // a permission request. Permission should be undecided at this point, so the + // permission request should still be outstanding by page reload. + + function onIframeReady() + { + // Make request on remote frame's Geolocation object. + iframe.contentWindow.navigator.geolocation.getCurrentPosition( + function(p) { + testFailed('Permission should not be determined for this page: ' + p); + finishJSTest(); + }); + + location.hash = '#reload'; + location.reload(); + } + + debug("Create IFrame"); + var iframe = document.createElement('iframe'); + iframe.src = 'resources/page-reload-cancel-permission-requests-inner.html'; + document.body.appendChild(iframe); +} + +window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js b/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js index b27df61..a8f2bda 100644 --- a/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js +++ b/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js @@ -28,12 +28,6 @@ function waitForWindowToClose() finishJSTest(); } -function failedToCreateWatch(e) -{ - testFailed("Failed to create watch: " + e); - finishJSTest(); -} - debug("Main page opening resources/window-close-popup.html"); otherWindow = window.open("resources/window-close-popup.html"); diff --git a/LayoutTests/fast/dom/HTMLFormElement/invalid-form-field-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/invalid-form-field-expected.txt new file mode 100644 index 0000000..a2dc689 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/invalid-form-field-expected.txt @@ -0,0 +1,5 @@ +PASS str is 'threw exception' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLFormElement/invalid-form-field.html b/LayoutTests/fast/dom/HTMLFormElement/invalid-form-field.html new file mode 100644 index 0000000..309ab10 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/invalid-form-field.html @@ -0,0 +1,45 @@ + + + + + + +
+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents-expected.txt b/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents-expected.txt new file mode 100644 index 0000000..da58066 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents-expected.txt @@ -0,0 +1,5 @@ +PASS typeof select.options.namedItem('option') is 'undefined' +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents.html b/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents.html new file mode 100644 index 0000000..bf8ffd1 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents.html @@ -0,0 +1,45 @@ + + + + + + +
+
+ + + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload-expected.txt new file mode 100644 index 0000000..c7fb018 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload-expected.txt @@ -0,0 +1,2 @@ +PASS beforeload called +This test will only print "PASS" or "FAIL" if link prefetches are enabled, otherwise it will show nothing below. diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload.html b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload.html new file mode 100644 index 0000000..27a62af --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload.html @@ -0,0 +1,14 @@ + +
+ + + +

This test will only print "PASS" or "FAIL" if link prefetches are +enabled, otherwise it will show nothing below.

+ + + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror-expected.txt new file mode 100644 index 0000000..47fc987 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror-expected.txt @@ -0,0 +1,6 @@ +This tests that onerror events can be attached to link elements with rel=prefetch. Since prefetch links are just there as a performance optimization, the onerror/onload event is their only programatic side-effect. + +If it works you should see a message below saying the test has passed. + +PASS onerror was called + diff --git a/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror.html b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror.html new file mode 100644 index 0000000..07ced9e --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror.html @@ -0,0 +1,25 @@ + + + + + + +

This tests that onerror events can be attached to link elements with rel=prefetch. Since prefetch links are just there as a performance optimization, the onerror/onload event is their only programatic side-effect.

+

If it works you should see a message below saying the test has passed.

+ +
+
+ + + diff --git a/LayoutTests/fast/encoding/dumpAsText/utf-16-no-bom-expected.txt b/LayoutTests/fast/encoding/dumpAsText/utf-16-no-bom-expected.txt index 4aea68a..15ca8a8 100644 --- a/LayoutTests/fast/encoding/dumpAsText/utf-16-no-bom-expected.txt +++ b/LayoutTests/fast/encoding/dumpAsText/utf-16-no-bom-expected.txt @@ -2,4 +2,3 @@ This XML file does not appear to have any style information associated with it. Should be "CYRILLIC SMALL LETTER IO" (like e with diaeresis): ё - diff --git a/LayoutTests/fast/js/resources/js-constructors-use-correct-global.js b/LayoutTests/fast/js/resources/js-constructors-use-correct-global.js new file mode 100644 index 0000000..df8cb08 --- /dev/null +++ b/LayoutTests/fast/js/resources/js-constructors-use-correct-global.js @@ -0,0 +1,16 @@ +description("Test to ensure that js constructors create objects with the correct constructor"); + +var otherGlobal = document.getElementsByTagName("iframe")[0].contentWindow; +var constructors = ["Object", "Function", "Array", "Number", "String", "Boolean", "RegExp", "Date", "Error", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Image"]; + +for (var i = 0; i < constructors.length; i++) { + shouldBeTrue("new otherGlobal." + constructors[i] + "() instanceof otherGlobal." + constructors[i]); + try { + if ((typeof (otherGlobal[constructors[i]]())) === "object" || (typeof (otherGlobal[constructors[i]]())) === "function") + shouldBeTrue("otherGlobal." + constructors[i] + "() instanceof otherGlobal." + constructors[i]); + } catch(e) { + + } +} + +successfullyParsed = true; -- cgit v1.1