--- a/browser/base/content/test/newtab/browser_newtab_drag_drop.js+++ b/browser/base/content/test/newtab/browser_newtab_drag_drop.js@@ -4,17 +4,16 @@ /* * These tests make sure that dragging and dropping sites works as expected. * Sites contained in the grid need to shift around to indicate the result * of the drag-and-drop operation. If the grid is full and we're dragging * a new site into it another one gets pushed out. */ function runTests() { requestLongerTimeout(2);- yield addNewTabPageTab(); // test a simple drag-and-drop scenario yield setLinks("0,1,2,3,4,5,6,7,8"); setPinnedLinks(""); yield addNewTabPageTab(); checkGrid("0,1,2,3,4,5,6,7,8");@@ -55,18 +54,18 @@ function runTests() { // pinned sites should not be pushed out of the grid (unless there are only // pinned ones left on the grid) yield setLinks("0,1,2,3,4,5,6,7,8"); setPinnedLinks(",,,,,,,7,8"); yield addNewTabPageTab(); checkGrid("0,1,2,3,4,5,6,7p,8p");- yield simulateDrop(2, 5);- checkGrid("0,1,3,4,5,2p,6,7p,8p");+ yield simulateDrop(2, 8);+ checkGrid("0,1,3,4,5,6,7p,8p,2p"); // make sure that pinned sites are re-positioned correctly yield setLinks("0,1,2,3,4,5,6,7,8"); setPinnedLinks("0,1,2,,,5"); yield addNewTabPageTab(); checkGrid("0p,1p,2p,3,4,5p,6,7,8");

--- a/browser/base/content/test/newtab/browser_newtab_drag_drop_ext.js+++ b/browser/base/content/test/newtab/browser_newtab_drag_drop_ext.js@@ -8,17 +8,16 @@ const PREF_NEWTAB_COLUMNS = "browser.new * Sites contained in the grid need to shift around to indicate the result * of the drag-and-drop operation. If the grid is full and we're dragging * a new site into it another one gets pushed out. * This is a continuation of browser_newtab_drag_drop.js * to decrease test run time, focusing on external sites. */ function runTests() { registerCleanupFunction(_ => Services.prefs.clearUserPref(PREF_NEWTAB_COLUMNS));- yield addNewTabPageTab(); // drag a new site onto the very first cell yield setLinks("0,1,2,3,4,5,6,7,8"); setPinnedLinks(",,,,,,,7,8"); yield addNewTabPageTab(); checkGrid("0,1,2,3,4,5,6,7p,8p");@@ -30,29 +29,29 @@ function runTests() { yield setLinks("0,1,2,3,4,5,6,7,8"); setPinnedLinks(",,,,,,,7,8"); yield addNewTabPageTab(); checkGrid("0,1,2,3,4,5,6,7p,8p"); // force the grid to be small enough that a pinned cell could be pushed out Services.prefs.setIntPref(PREF_NEWTAB_COLUMNS, 3);- yield simulateExternalDrop(5);- checkGrid("0,1,2,3,4,99p,5,7p,8p");+ yield simulateExternalDrop(7);+ checkGrid("0,1,2,3,4,5,7p,99p,8p"); // drag a new site beneath a pinned cell and make sure the pinned cell is // not moved yield setLinks("0,1,2,3,4,5,6,7,8"); setPinnedLinks(",,,,,,,,8"); yield addNewTabPageTab(); checkGrid("0,1,2,3,4,5,6,7,8p");- yield simulateExternalDrop(5);- checkGrid("0,1,2,3,4,99p,5,6,8p");+ yield simulateExternalDrop(7);+ checkGrid("0,1,2,3,4,5,6,99p,8p"); // drag a new site onto a block of pinned sites and make sure they're shifted // around accordingly yield setLinks("0,1,2,3,4,5,6,7,8"); setPinnedLinks("0,1,2,,,,,,"); yield addNewTabPageTab(); checkGrid("0p,1p,2p");