diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:52 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:52 -0800 |
commit | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (patch) | |
tree | 11425ea0b299d6fb89c6d3618a22d97d5bf68d0f /WebCore/manual-tests/onbeforeunload-close_with_javascript.html | |
parent | 648161bb0edfc3d43db63caed5cc5213bc6cb78f (diff) | |
download | external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.zip external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.tar.gz external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'WebCore/manual-tests/onbeforeunload-close_with_javascript.html')
-rw-r--r-- | WebCore/manual-tests/onbeforeunload-close_with_javascript.html | 40 |
1 files changed, 40 insertions, 0 deletions
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 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" + "http://www.w3.org/TR/html4/strict.dtd"> +<html lang="en"> +<head> +<script language="JavaScript"> +function openWindow() { + window.open("./onbeforeunload-close_with_javascript.html","name","width=700px,height=500px"); +} +</script> +</head> +<BODY onbeforeunload="return 'onBeforeUnloadHandler return string is displayed here.';"> +<p><b>BUG ID:</b> <a href="rdar://problem/4394910">4394910</a> calling Javascript window.close() does not trigger onbeforeunload event</p> + +<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> + <ol> + <li>Click the "Open" button below. + <li>In the window that opens, click the "Close" button. + </ol> +</p> + +<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> +After the close button is clicked, you should see a dialog that reads:</p> +<pre>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.</pre> +<p id="success" style="background-color:palegreen; padding:3px;">You should see the same dialog if you click the "Close" button in the main window. +</p> + +<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b> +No dialog (as described above) after clicking the "Close" button in the newly opened window, or in the main window. +</p> + +<BODY onbeforeunload="return 'onBeforeUnloadHandler return string is displayed here.';"> +<input type=button value="Open Window" onclick="openWindow()"><br> +<input type=button value="Close Window" onclick="window.close();"><br> +<p>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).</p> +</body> +</html> |