mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1126184: Part 3: Mochitest fixes for suggested tiles.
This commit is contained in:
parent
d4f6bddf19
commit
b9071b82f4
@ -9,6 +9,7 @@
|
||||
*/
|
||||
function runTests() {
|
||||
requestLongerTimeout(2);
|
||||
yield addNewTabPageTab();
|
||||
|
||||
// test a simple drag-and-drop scenario
|
||||
yield setLinks("0,1,2,3,4,5,6,7,8");
|
||||
|
@ -13,6 +13,7 @@ const PREF_NEWTAB_COLUMNS = "browser.newtabpage.columns";
|
||||
*/
|
||||
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");
|
||||
|
@ -6,6 +6,8 @@
|
||||
* dragging them around.
|
||||
*/
|
||||
function runTests() {
|
||||
yield addNewTabPageTab();
|
||||
|
||||
// the first three sites are pinned - make sure they're re-arranged correctly
|
||||
yield setLinks("0,1,2,3,4,5,6,7,8");
|
||||
setPinnedLinks("0,1,2,,,5");
|
||||
|
@ -531,6 +531,12 @@ let DirectoryLinksProvider = {
|
||||
_updateRelatedTile: function() {
|
||||
let sortedLinks = NewTabUtils.getProviderLinks(this);
|
||||
|
||||
if (!sortedLinks) {
|
||||
// If NewTabUtils.links.resetCache() is called before getting here,
|
||||
// sortedLinks may be undefined.
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete the current related tile, if one exists.
|
||||
let initialLength = sortedLinks.length;
|
||||
this.maxNumLinks = initialLength;
|
||||
|
@ -936,7 +936,7 @@ let Links = {
|
||||
// Build a list containing a copy of each provider's sortedLinks list.
|
||||
let linkLists = [];
|
||||
for (let links of this._providers.values()) {
|
||||
if (links) {
|
||||
if (links && links.sortedLinks) {
|
||||
linkLists.push(links.sortedLinks.slice());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user