| Index: LayoutTests/fast/events/before-unload-returnValue.html
|
| diff --git a/LayoutTests/fast/events/before-unload-returnValue.html b/LayoutTests/fast/events/before-unload-returnValue.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..01132ec4cdd756138e5886d0a341cf5e6411f622
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/events/before-unload-returnValue.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../js/resources/js-test-pre.js"></script>
|
| +<script>
|
| +if (window.testRunner)
|
| + testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true);
|
| +
|
| +window.onload = function() {
|
| + window.location.href = "resources/does-not-exist.html";
|
| + setTimeout(finishJSTest, 0);
|
| +}
|
| +
|
| +var testEvent;
|
| +window.onbeforeunload = function(event) {
|
| + testEvent = event;
|
| + shouldBe("testEvent.__proto__", "BeforeUnloadEvent.prototype");
|
| + shouldBeEqualToString("testEvent.returnValue", "");
|
| + event.returnValue = "This is beforeunload from the top level frame.";
|
| + shouldBeEqualToString("testEvent.returnValue", "This is beforeunload from the top level frame.");
|
| +}
|
| +</script>
|
| +</head>
|
| +<body>
|
| +<script>
|
| +description("Tests the returnValue attribute of the BeforeUnloadEvent.");
|
| +self.jsTestIsAsync = true;
|
| +</script>
|
| +<script src="../js/resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
| +
|
|
|