From 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 3 Mar 2009 19:30:52 -0800 Subject: auto import from //depot/cupcake/@135843 --- .../onbeforeunload-close_with_javascript.html | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 WebCore/manual-tests/onbeforeunload-close_with_javascript.html (limited to 'WebCore/manual-tests/onbeforeunload-close_with_javascript.html') diff --git a/WebCore/manual-tests/onbeforeunload-close_with_javascript.html b/WebCore/manual-tests/onbeforeunload-close_with_javascript.html new file mode 100644 index 0000000..525f8f1 --- /dev/null +++ b/WebCore/manual-tests/onbeforeunload-close_with_javascript.html @@ -0,0 +1,40 @@ + + + + + + +

BUG ID: 4394910 calling Javascript window.close() does not trigger onbeforeunload event

+ +

STEPS TO TEST: +

    +
  1. Click the "Open" button below. +
  2. In the window that opens, click the "Close" button. +
+

+ +

TEST PASS: +After the close button is clicked, you should see a dialog that reads:

+
Are you sure you want to navigate away from this page?
+
+onBeforeUnloadHandler return string is displayed here.
+
+Press OK to continue or Cancel to stay on the current page.
+

You should see the same dialog if you click the "Close" button in the main window. +

+ +

TEST FAIL: +No dialog (as described above) after clicking the "Close" button in the newly opened window, or in the main window. +

+ + +
+
+

Click the Open Window button. Once the new window is opened, close the new window by clicking the Close Window button (not the browser's close window icon).

+ + -- cgit v1.1