Bug 1172651 - Remove a test for unimplemented behavior from browser_968565_insert_before_hidden_items.js. r=gijs
authorTooru Fujisawa <arai_a@mac.com>
Wed, 17 Jun 2015 20:56:13 +0900
changeset 249340 a57875030d605c5f9bffc1e048738f5cbdcc366f
parent 249339 fce5800610499026a804d5599bcfae0f6185ad05
child 249341 f9c16fa4852ccea8fb87b10626309a055d73c2cd
push id28923
push userryanvm@gmail.com
push dateWed, 17 Jun 2015 18:57:11 +0000
treeherdermozilla-central@099d6cd6725e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1172651
milestone41.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 1172651 - Remove a test for unimplemented behavior from browser_968565_insert_before_hidden_items.js. r=gijs
browser/components/customizableui/CustomizeMode.jsm
browser/components/customizableui/test/browser_968565_insert_before_hidden_items.js
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -1638,17 +1638,16 @@ CustomizeMode.prototype = {
         dragOverItem = targetIsToolbar ? this._findVisiblePreviousSiblingNode(targetNode.lastChild) :
                                          targetParent.lastChild;
         dragValue = "after";
       } else {
         dragOverItem = targetParent.children[position];
         if (!targetIsToolbar) {
           dragValue = "before";
         } else {
-          dragOverItem = this._findVisiblePreviousSiblingNode(targetParent.children[position]);
           // Check if the aDraggedItem is hovered past the first half of dragOverItem
           let window = dragOverItem.ownerDocument.defaultView;
           let direction = window.getComputedStyle(dragOverItem, null).direction;
           let itemRect = dragOverItem.getBoundingClientRect();
           let dropTargetCenter = itemRect.left + (itemRect.width / 2);
           let existingDir = dragOverItem.getAttribute("dragover");
           if ((existingDir == "before") == (direction == "ltr")) {
             dropTargetCenter += (parseInt(dragOverItem.style.borderLeftWidth) || 0) / 2;
--- a/browser/components/customizableui/test/browser_968565_insert_before_hidden_items.js
+++ b/browser/components/customizableui/test/browser_968565_insert_before_hidden_items.js
@@ -49,34 +49,8 @@ add_task(function() {
 
   yield endCustomizing();
 
   is(downloadsButton.previousSibling.id, lastVisible.id,
      "The downloads button should be placed after the last visible item.");
 
   yield resetCustomization();
 });
-
-// When we drag an item onto a target that has a hidden element before it, we should
-// instead place the new item before the hidden elements.
-add_task(function() {
-  ok(CustomizableUI.inDefaultState, "Should be in the default state");
-
-  let hidden1 = createDummyXULButton(kHidden1Id, "You can't see me");
-  hidden1.hidden = true;
-
-  let homeButton = document.getElementById("home-button");
-  CustomizableUI.addWidgetToArea(kHidden1Id, CustomizableUI.AREA_NAVBAR,
-                                 CustomizableUI.getPlacementOfWidget(homeButton.id).position);
-
-  hidden1 = document.getElementById(kHidden1Id);
-  is(hidden1.nextSibling.id, homeButton.id, "The hidden item should be before the home button");
-
-  yield startCustomizing();
-  let downloadsButton = document.getElementById("downloads-button");
-  simulateItemDrag(downloadsButton.parentNode, homeButton.parentNode);
-  yield endCustomizing();
-
-  is(hidden1.nextSibling.id, homeButton.id, "The hidden item should still be before the home button");
-  is(downloadsButton.nextSibling.id, hidden1.id, "The downloads button should now be before the hidden button");
-
-  yield resetCustomization();
-});