- tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=7000
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2006 17:32:53 +0000 (17:32 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2006 17:32:53 +0000 (17:32 +0000)
          REGRESSION: Scrolling is triggering onunload in TOT

        * fast/events/onunload-body-property.html: Added.
        * fast/events/onunload-body-property-expected.txt: Added.
        * fast/events/onunload-window-property.html: Added.
        * fast/events/onunload-window-property-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12533 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/events/onunload-body-property-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/onunload-body-property.html [new file with mode: 0644]
LayoutTests/fast/events/onunload-window-property-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/onunload-window-property.html [new file with mode: 0644]

index 484b306..88b52cb 100644 (file)
@@ -1,3 +1,13 @@
+2006-02-02  Darin Adler  <darin@apple.com>
+
+        - tests for http://bugzilla.opendarwin.org/show_bug.cgi?id=7000
+          REGRESSION: Scrolling is triggering onunload in TOT
+
+        * fast/events/onunload-body-property.html: Added.
+        * fast/events/onunload-body-property-expected.txt: Added.
+        * fast/events/onunload-window-property.html: Added.
+        * fast/events/onunload-window-property-expected.txt: Added.
+
 2006-02-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
 
         Reviewed by Darin.
diff --git a/LayoutTests/fast/events/onunload-body-property-expected.txt b/LayoutTests/fast/events/onunload-body-property-expected.txt
new file mode 100644 (file)
index 0000000..908c920
--- /dev/null
@@ -0,0 +1,2 @@
+ALERT: unload
+You should have seen an unload alert appear.
diff --git a/LayoutTests/fast/events/onunload-body-property.html b/LayoutTests/fast/events/onunload-body-property.html
new file mode 100644 (file)
index 0000000..afeb869
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+
+<head>
+<script>
+
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function unload()
+{
+    alert("unload");
+}
+
+function load()
+{
+    document.body.onunload = unload;
+    location = "data:text/html,You should have seen an unload alert appear.<script>if (window.layoutTestController) layoutTestController.notifyDone(); </" + "script>";
+}
+
+</script>
+</head>
+
+<body onload="load()">
+start document
+</body>
+
+</html>
diff --git a/LayoutTests/fast/events/onunload-window-property-expected.txt b/LayoutTests/fast/events/onunload-window-property-expected.txt
new file mode 100644 (file)
index 0000000..908c920
--- /dev/null
@@ -0,0 +1,2 @@
+ALERT: unload
+You should have seen an unload alert appear.
diff --git a/LayoutTests/fast/events/onunload-window-property.html b/LayoutTests/fast/events/onunload-window-property.html
new file mode 100644 (file)
index 0000000..e66056c
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+
+<head>
+<script>
+
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function unload()
+{
+    alert("unload");
+}
+
+function load()
+{
+    window.onunload = unload;
+    location = "data:text/html,You should have seen an unload alert appear.<script>if (window.layoutTestController) layoutTestController.notifyDone(); </" + "script>";
+}
+
+</script>
+</head>
+
+<body onload="load()">
+start document
+</body>
+
+</html>