Fix assert seen in DRT due to not calling EventSender.mouseUp in a previous test
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 02:29:12 +0000 (02:29 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 02:29:12 +0000 (02:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80925

Reviewed by Maciej Stachowiak.

* fast/events/input-element-display-none-in-dragleave-crash.html:
Add call to eventSender.mouseUp().

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

LayoutTests/ChangeLog
LayoutTests/fast/events/input-element-display-none-in-dragleave-crash.html

index 981395d..c0b4d25 100644 (file)
@@ -1,3 +1,13 @@
+2012-03-12  Sam Weinig  <sam@webkit.org>
+
+        Fix assert seen in DRT due to not calling EventSender.mouseUp in a previous test
+        https://bugs.webkit.org/show_bug.cgi?id=80925
+
+        Reviewed by Maciej Stachowiak.
+
+        * fast/events/input-element-display-none-in-dragleave-crash.html:
+        Add call to eventSender.mouseUp().
+
 2012-03-12  Zhenyao Mo  <zmo@google.com>
 
         After webgl canvas resize, bindings might be lost
index 9f96928..3fd7eed 100644 (file)
                 var y = dropTarget.offsetTop + dropTarget.offsetHeight / 2;
                 eventSender.mouseMoveTo(x, y);
                 eventSender.mouseMoveTo(0, 0);
+
+                // The test harness wants us to call eventSender.mouseUp() before finishing,
+                // but we need to not navigate when that happens, so add a drop handler that
+                // prevents navigation.
+                window.addEventListener("drop", function() {
+                  event.preventDefault();
+                }, false);
+                eventSender.mouseUp();
             }
             
             if (window.layoutTestController)