From 65f03d4f644ce73618e5f4f50dd694b26f55ae12 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 13 May 2011 16:23:25 +0100 Subject: Merge WebKit at r75993: Initial merge by git. Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3 --- .../Geolocation/resources/window-close-popup.html | 19 ++++++++++ .../Geolocation/script-tests/window-close-crash.js | 41 ++++++++++++++++++++++ .../Geolocation/window-close-crash-expected.txt | 14 ++++++++ .../fast/dom/Geolocation/window-close-crash.html | 13 +++++++ 4 files changed, 87 insertions(+) create mode 100644 LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html create mode 100644 LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js create mode 100644 LayoutTests/fast/dom/Geolocation/window-close-crash-expected.txt create mode 100644 LayoutTests/fast/dom/Geolocation/window-close-crash.html (limited to 'LayoutTests/fast/dom') diff --git a/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html b/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html new file mode 100644 index 0000000..cfeabae --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html @@ -0,0 +1,19 @@ + + diff --git a/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js b/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js new file mode 100644 index 0000000..b27df61 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js @@ -0,0 +1,41 @@ +description("Tests the assertion that the GeolocationClient should not be updating
" + + "when the GeolocationController is destroyed.
" + + "See https://bugs.webkit.org/show_bug.cgi?id=52216"); + +var otherWindow; + +if (window.layoutTestController) { + layoutTestController.waitUntilDone(); + layoutTestController.setCanOpenWindows(); + layoutTestController.setCloseRemainingWindowsWhenComplete(true); +} else + testFailed('This test can not be run without the LayoutTestController'); + +function gotPosition(p) +{ + testPassed("Received Geoposition."); + otherWindow.close(); + window.setTimeout(waitForWindowToClose, 0); +} + +function waitForWindowToClose() +{ + if (!otherWindow.closed) { + window.setTimeout(waitForWindowToClose, 0); + return; + } + testPassed("Success - no crash!"); + 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"); + +window.jsTestIsAsync = true; +window.successfullyParsed = true; diff --git a/LayoutTests/fast/dom/Geolocation/window-close-crash-expected.txt b/LayoutTests/fast/dom/Geolocation/window-close-crash-expected.txt new file mode 100644 index 0000000..bc136e6 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/window-close-crash-expected.txt @@ -0,0 +1,14 @@ +Tests the assertion that the GeolocationClient should not be updating +when the GeolocationController is destroyed. +See https://bugs.webkit.org/show_bug.cgi?id=52216 + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Main page opening resources/window-close-popup.html +PASS Received Geoposition. +PASS Success - no crash! +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/Geolocation/window-close-crash.html b/LayoutTests/fast/dom/Geolocation/window-close-crash.html new file mode 100644 index 0000000..fc23692 --- /dev/null +++ b/LayoutTests/fast/dom/Geolocation/window-close-crash.html @@ -0,0 +1,13 @@ + + + + + + + +

+
+ + + + -- cgit v1.1