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. r=adw
This commit is contained in:
parent
0ea5074cf7
commit
79ca0f15ef
@ -31,4 +31,6 @@ function runTests() {
|
||||
NewTabUtils.allPages.enabled = true;
|
||||
ok(!gridNode.hasAttribute("page-disabled"), "page is not disabled");
|
||||
ok(!oldGridNode.hasAttribute("page-disabled"), "old page is not disabled");
|
||||
|
||||
yield restore();
|
||||
}
|
||||
|
@ -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