Bug 512347 - synthesizeDrop from EventUtils doesn't work; Fix initDragEvent() calls
authorNochum Sossonko <highmind63@gmail.com>
Tue, 01 Sep 2009 00:52:31 +0200
changeset 32119 8384b031de644bdb44ca9b3404f2632951c16069
parent 32118 dbebdc180062651e4e880dff80c2067d83fd66cd
child 32120 a3f91fac11aa886b7c00df29fa467d4556fa92d5
push id8855
push usersgautherie.bz@free.fr
push dateMon, 31 Aug 2009 22:53:28 +0000
treeherderautoland@8384b031de64 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs512347
milestone1.9.3a1pre
Bug 512347 - synthesizeDrop from EventUtils doesn't work; Fix initDragEvent() calls r=enndeakin
testing/mochitest/tests/SimpleTest/EventUtils.js
--- a/testing/mochitest/tests/SimpleTest/EventUtils.js
+++ b/testing/mochitest/tests/SimpleTest/EventUtils.js
@@ -497,27 +497,27 @@ function synthesizeDrop(element, dragDat
   window.addEventListener("dragstart", trapDrag, true);
   synthesizeMouse(element, 2, 2, { type: "mousedown" });
   synthesizeMouse(element, 9, 9, { type: "mousemove" });
   synthesizeMouse(element, 10, 10, { type: "mousemove" });
   window.removeEventListener("dragstart", trapDrag, true);
   synthesizeMouse(element, 10, 10, { type: "mouseup" });
 
   var event = document.createEvent("DragEvents");
-  event.initDragEvent("dragover", true, true, window, 0, dataTransfer);
+  event.initDragEvent("dragover", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null, dataTransfer);
   if (element.dispatchEvent(event))
     return "none";
 
   event = document.createEvent("DragEvents");
-  event.initDragEvent("dragexit", true, true, window, 0, dataTransfer);
+  event.initDragEvent("dragexit", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null, dataTransfer);
   element.dispatchEvent(event);
 
   if (dataTransfer.dropEffect != "none") {
     event = document.createEvent("DragEvents");
-    event.initDragEvent("drop", true, true, window, 0, dataTransfer);
+    event.initDragEvent("drop", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null, dataTransfer);
     element.dispatchEvent(event);
   }
 
   return dataTransfer.dropEffect;
 }
 
 function disableNonTestMouseEvents(aDisable)
 {