Bug 1210375 - Use correct GRAB_DELAY in the markup view;r=pbrosset
authorBrian Grinstead <bgrinstead@mozilla.com>
Thu, 01 Oct 2015 13:26:11 -0700
changeset 265703 df3fb2045c1c23da5fa8cd20e3d454342de87d86
parent 265702 21ae0d771356c908e3caae98e4e586538b5901db
child 265704 a41fe0bb1161a3917cc04e8e4d6d4789459faad1
push id66003
push usercbook@mozilla.com
push dateFri, 02 Oct 2015 11:37:40 +0000
treeherdermozilla-inbound@3fd732d24f46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbrosset
bugs1210375
milestone44.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 1210375 - Use correct GRAB_DELAY in the markup view;r=pbrosset
devtools/client/markupview/markup-view.js
devtools/client/markupview/test/browser_markupview_dragdrop_isDragging.js
--- a/devtools/client/markupview/markup-view.js
+++ b/devtools/client/markupview/markup-view.js
@@ -1924,17 +1924,17 @@ MarkupContainer.prototype = {
       this.isDragging = true;
 
       this._dragStartY = event.pageY;
       this.markup.indicateDropTarget(this.elt);
 
       // If this is the last child, use the closing <div.tag-line> of parent as indicator
       this.markup.indicateDragTarget(this.elt.nextElementSibling ||
                                      this.markup.getContainer(this.node.parentNode()).closeTagLine);
-    }, this.GRAB_DELAY);
+    }, this.markup.GRAB_DELAY);
   },
 
   /**
    * On mouse up, stop dragging.
    */
   _onMouseUp: Task.async(function*() {
     this._isMouseDown = false;
 
--- a/devtools/client/markupview/test/browser_markupview_dragdrop_isDragging.js
+++ b/devtools/client/markupview/test/browser_markupview_dragdrop_isDragging.js
@@ -22,16 +22,20 @@ add_task(function*() {
     pageX: rect.x,
     pageY: rect.y,
     stopPropagation: function() {},
     preventDefault: function() {}
   });
 
   ok(!el.isDragging, "isDragging should not be set to true immediately");
 
+  info("Waiting for 10ms");
+  yield wait(10);
+  ok(!el.isDragging, "isDragging should not be set to true after a brief wait");
+
   info("Waiting " + (GRAB_DELAY + 1) + "ms");
   yield wait(GRAB_DELAY + 1);
   ok(el.isDragging, "isDragging true after GRAB_DELAY has passed");
 
   let dropCompleted = once(inspector.markup, "drop-completed");
 
   info("Simulating mouseUp on #test");
   el._onMouseUp({