зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1369287 - shipping compact new tab page view by default;r=Gijs
MozReview-Commit-ID: FTEicOcGqtv --HG-- extra : rebase_source : f85c78fedea1c1425d35a01713c60311e9d3f3d2
This commit is contained in:
Родитель
d8042b776d
Коммит
18dfa02948
|
@ -1270,16 +1270,16 @@ pref("browser.newtabpage.enabled", true);
|
|||
sticky_pref("browser.newtabpage.enhanced", true);
|
||||
|
||||
// enables Activity Stream inspired layout
|
||||
pref("browser.newtabpage.compact", false);
|
||||
pref("browser.newtabpage.compact", true);
|
||||
|
||||
// enables showing basic placeholders for missing thumbnails
|
||||
pref("browser.newtabpage.thumbnailPlaceholder", false);
|
||||
|
||||
// number of rows of newtab grid
|
||||
pref("browser.newtabpage.rows", 3);
|
||||
pref("browser.newtabpage.rows", 2);
|
||||
|
||||
// number of columns of newtab grid
|
||||
pref("browser.newtabpage.columns", 5);
|
||||
pref("browser.newtabpage.columns", 6);
|
||||
|
||||
// directory tiles download URL
|
||||
pref("browser.newtabpage.directory.source", "https://tiles.services.mozilla.com/v3/links/fetch/%LOCALE%/%CHANNEL%");
|
||||
|
|
|
@ -23,8 +23,8 @@ add_task(async function() {
|
|||
// Expected length of grid
|
||||
let expectedValues = [1, 1, 1, 1, 8, 10];
|
||||
|
||||
// Values before setting new pref values (15 is the default value -> 5 x 3)
|
||||
let previousValues = [15, 1, 1, 1, 1, 8];
|
||||
// Values before setting new pref values (12 is the default value -> 6 x 2)
|
||||
let previousValues = [12, 1, 1, 1, 1, 8];
|
||||
|
||||
await addNewTabPageTab();
|
||||
let existingTab = gBrowser.selectedTab;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
requestLongerTimeout(2);
|
||||
|
||||
const PREF_NEWTAB_COLUMNS = "browser.newtabpage.columns";
|
||||
const PREF_NEWTAB_ROWS = "browser.newtabpage.rows";
|
||||
|
||||
/*
|
||||
* These tests make sure that dragging and dropping sites works as expected.
|
||||
|
@ -36,6 +37,7 @@ const PREF_NEWTAB_COLUMNS = "browser.newtabpage.columns";
|
|||
|
||||
// force the grid to be small enough that a pinned cell could be pushed out
|
||||
await pushPrefs([PREF_NEWTAB_COLUMNS, 3]);
|
||||
await pushPrefs([PREF_NEWTAB_ROWS, 3]);
|
||||
await simulateExternalDrop(5);
|
||||
await checkGrid("0,1,2,3,4,99p,5,7p,8p");
|
||||
|
||||
|
@ -60,4 +62,14 @@ const PREF_NEWTAB_COLUMNS = "browser.newtabpage.columns";
|
|||
|
||||
await simulateExternalDrop(1);
|
||||
await checkGrid("0p,99p,1p,2p,3,4,5,6,7");
|
||||
|
||||
// force the grid to be small enough that a pinned cell could be pushed out
|
||||
// and the full list is truncated
|
||||
await setLinks("0,1,2,3,4,5,6,7,8");
|
||||
setPinnedLinks(",,,,,,,7,8");
|
||||
|
||||
await addNewTabPageTab();
|
||||
await pushPrefs([PREF_NEWTAB_ROWS, 2]);
|
||||
await simulateExternalDrop(5);
|
||||
await checkGrid("0,1,2,3,4,99p");
|
||||
});
|
||||
|
|
|
@ -328,7 +328,7 @@ async function addNewTabPageTab() {
|
|||
* Compares the current grid arrangement with the given pattern.
|
||||
* @param the pattern (see below)
|
||||
*
|
||||
* Example: checkGrid("3p,2,,1p")
|
||||
* Example: checkGrid("3p,2,,4p")
|
||||
* Result: We expect the first cell to contain the pinned site 'http://example3.com/'.
|
||||
* The second cell contains 'http://example2.com/'. The third cell is empty.
|
||||
* The fourth cell contains the pinned site 'http://example4.com/'.
|
||||
|
|
Загрузка…
Ссылка в новой задаче