Bug 1498381 - EventUtils.js shouldn't dispatch artificial mouseup after dnd, r=masayuki
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 12 Oct 2018 14:05:26 +0300
changeset 499917 2c7473068da142246c65c671387eaa8108c04ae3
parent 499901 db589d2f37284b67611b56d969b4bc9442697002
child 499918 39df6098355c40854c6f54077f897f645fac9cbe
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1498381
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1498381 - EventUtils.js shouldn't dispatch artificial mouseup after dnd, r=masayuki
testing/mochitest/tests/SimpleTest/EventUtils.js
--- a/testing/mochitest/tests/SimpleTest/EventUtils.js
+++ b/testing/mochitest/tests/SimpleTest/EventUtils.js
@@ -2330,18 +2330,16 @@ function synthesizeDropAfterDragOver(aRe
   if (aResult) {
     effect = "none";
   } else if (effect != "none") {
     event = createDragEventObject("drop", aDestElement, aDestWindow,
                                   aDataTransfer, aDragEvent);
     sendDragEvent(event, aDestElement, aDestWindow);
   }
 
-  synthesizeMouseAtCenter(aDestElement, { type: "mouseup" }, aDestWindow);
-
   return effect;
 }
 
 /**
  * Emulate a drag and drop by emulating a dragstart and firing events dragenter,
  * dragover, and drop.
  *
  * @param aSrcElement   The element to use to start the drag.
@@ -2460,17 +2458,16 @@ async function synthesizePlainDragAndDro
     await new Promise(r => setTimeout(r, 0));
 
     event = createDragEventObject("drop", destElement, destWindow,
                                   dataTransfer, {});
     sendDragEvent(event, destElement, destWindow);
 
     await new Promise(r => setTimeout(r, 0));
 
-    synthesizeMouseAtCenter(destElement, { type: "mouseup" }, destWindow);
   } finally {
     ds.endDragSession(true, 0);
   }
 }
 
 var PluginUtils =
 {
   withTestPlugin : function(callback)