Bug 1026561 - The New Tab Page should be smarter about showing more tiles when on large screens [r=adw]
☠☠ backed out by 5350ded95c51 ☠ ☠
authorEd Lee <edilee@mozilla.com>
Thu, 17 Jul 2014 22:32:54 -0700
changeset 216817 9d1b8acf821dd921dab7a81076cfa6964fcc7581
parent 216816 5c43367a720f0de2280fdcdbae9dcf4f27c1743b
child 216818 5350ded95c514e78d1807694529a2434cb2c2597
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1026561
milestone33.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 1026561 - The New Tab Page should be smarter about showing more tiles when on large screens [r=adw] Bump up default columns to fit most Firefox users including 2560px wide resolutions.
browser/app/profile/firefox.js
browser/base/content/test/newtab/browser_newtab_bug752841.js
browser/base/content/test/newtab/browser_newtab_drag_drop_ext.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1466,17 +1466,17 @@ pref("browser.newtab.preload", true);
 
 // Toggles the content of 'about:newtab'. Shows the grid when enabled.
 pref("browser.newtabpage.enabled", true);
 
 // number of rows of newtab grid
 pref("browser.newtabpage.rows", 3);
 
 // number of columns of newtab grid
-pref("browser.newtabpage.columns", 3);
+pref("browser.newtabpage.columns", 8);
 
 // directory tiles download URL
 pref("browser.newtabpage.directory.source", "chrome://global/content/directoryLinks.json");
 
 // endpoint to send newtab click reports
 pref("browser.newtabpage.directory.reportClickEndPoint", "https://tiles.up.mozillalabs.com/ping/click");
 
 // Enable the DOM fullscreen API.
--- a/browser/base/content/test/newtab/browser_newtab_bug752841.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug752841.js
@@ -12,18 +12,18 @@ function runTests() {
     {row: 0, column: -1},
     {row: 2, column: 4},
     {row: 2, column: 5},
   ];
 
   // Expected length of grid
   let expectedValues = [1, 1, 1, 1, 8, 10];
 
-   // Values before setting new pref values (9 is the default value -> 3 x 3)
-  let previousValues = [9, 1, 1, 1, 1, 8];
+   // Values before setting new pref values (24 is the default value -> 8 x 3)
+  let previousValues = [24, 1, 1, 1, 1, 8];
 
   let existingTab, existingTabGridLength, newTab, newTabGridLength;
   yield addNewTabPageTab();
   existingTab = gBrowser.selectedTab;
 
   for (let i = 0; i < expectedValues.length; i++) {
     gBrowser.selectedTab = existingTab;
     existingTabGridLength = getGrid().cells.length;
--- a/browser/base/content/test/newtab/browser_newtab_drag_drop_ext.js
+++ b/browser/base/content/test/newtab/browser_newtab_drag_drop_ext.js
@@ -1,11 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
+const PREF_NEWTAB_COLUMNS = "browser.newtabpage.columns";
+
 /*
  * 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.
  * This is a continuation of browser_newtab_drag_drop.js
  * to decrease test run time, focusing on external sites.
  */
@@ -23,18 +25,21 @@ function runTests() {
   // drag a new site onto the grid and make sure that pinned cells don't get
   // pushed out
   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(7);
   checkGrid("0,1,2,3,4,5,7p,99p,8p");
+  Services.prefs.clearUserPref(PREF_NEWTAB_COLUMNS);
 
   // 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");
@@ -47,9 +52,9 @@ function runTests() {
   yield setLinks("0,1,2,3,4,5,6,7,8");
   setPinnedLinks("0,1,2,,,,,,");
 
   yield addNewTabPageTab();
   checkGrid("0p,1p,2p");
 
   yield simulateExternalDrop(1);
   checkGrid("0p,99p,1p,2p,3,4,5,6,7");
-}
\ No newline at end of file
+}