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.
This commit is contained in:
Ed Lee 2014-08-15 02:40:20 -07:00
parent d500d97e10
commit 5626bfe92f
3 changed files with 9 additions and 4 deletions

View File

@ -1522,7 +1522,7 @@ pref("browser.newtabpage.enhanced", false);
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");

View File

@ -17,8 +17,8 @@ function runTests() {
// 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();

View File

@ -1,6 +1,8 @@
/* 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
@ -28,8 +30,11 @@ function runTests() {
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
@ -52,4 +57,4 @@ function runTests() {
yield simulateExternalDrop(1);
checkGrid("0p,99p,1p,2p,3,4,5,6,7");
}
}