| Index: content/test/data/hang_before_unload.html
|
| diff --git a/content/test/data/hang_before_unload.html b/content/test/data/hang_before_unload.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bd48d4a1198fbd50a6746f8fc02d99aa8d06aeea
|
| --- /dev/null
|
| +++ b/content/test/data/hang_before_unload.html
|
| @@ -0,0 +1,29 @@
|
| +<html>
|
| +
|
| + <head><title>BeforeUnload dialog</title>
|
| + <script>
|
| + function clickLink() {
|
| + var evt = document.createEvent("MouseEvents");
|
| + evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false,
|
| + false, false, 0, null);
|
| + var target = document.getElementById("link");
|
| + target.dispatchEvent(evt);
|
| + }
|
| +
|
| + function clickLinkSoon() {
|
| + window.setTimeout(clickLink, 100);
|
| + return true;
|
| + }
|
| +
|
| + window.addEventListener("beforeunload", function(e) {
|
| + var confirmationMessage = "foo";
|
| + e.returnValue = confirmationMessage;
|
| + return confirmationMessage;
|
| + });
|
| +
|
| + </script>
|
| + </head>
|
| +
|
| +<a href="title2.html" id="link">link</a><br>
|
| +
|
| +</html>
|
|
|