- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7018
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2006 05:16:42 +0000 (05:16 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2006 05:16:42 +0000 (05:16 +0000)
          REGRESSION: clearTimeout no longer works

        * fast/dom/Window/clear-timeout.html: Added.
        * fast/dom/Window/clear-timeout-expected.txt: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/clear-timeout-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/clear-timeout.html [new file with mode: 0644]

index ff79594f09e22c4347777e1072f8e0a012c73828..daf7c8d211eba90b9b3cd7dd38177f2957390f16 100644 (file)
@@ -1,3 +1,11 @@
+2006-02-01  Darin Adler  <darin@apple.com>
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7018
+          REGRESSION: clearTimeout no longer works
+
+        * fast/dom/Window/clear-timeout.html: Added.
+        * fast/dom/Window/clear-timeout-expected.txt: Added.
+
 2006-01-31  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
diff --git a/LayoutTests/fast/dom/Window/clear-timeout-expected.txt b/LayoutTests/fast/dom/Window/clear-timeout-expected.txt
new file mode 100644 (file)
index 0000000..ed086db
--- /dev/null
@@ -0,0 +1,4 @@
+This test checks that clearTimeout works by setting up two timeouts and cancelling one. If the test succeeds you should see only function f2 being called below.
+
+The function f2 was called.
+
diff --git a/LayoutTests/fast/dom/Window/clear-timeout.html b/LayoutTests/fast/dom/Window/clear-timeout.html
new file mode 100644 (file)
index 0000000..ebb7d5a
--- /dev/null
@@ -0,0 +1,28 @@
+<script>
+
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function f1()
+{
+    document.getElementById('line1').appendChild(document.createTextNode('The function f1 was called, clearTimeout failed.'));
+}
+
+function f2()
+{
+    document.getElementById('line2').appendChild(document.createTextNode('The function f2 was called.'));
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+
+var t1 = setTimeout('f1()', 0);
+setTimeout('f2()', 20);
+clearTimeout(t1);
+
+</script>
+<p>This test checks that clearTimeout works by setting up two timeouts and cancelling one.
+If the test succeeds you should see only function f2 being called below.</p>
+<div id="line1"></div>
+<div id="line2"></div>