mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1212633 - include mobile and unfiled folders in Sync's concept of 'all IDs'. r=rnewman
This commit is contained in:
parent
06f9f34bc8
commit
7e5f84eea0
@ -1352,7 +1352,15 @@ BookmarksStore.prototype = {
|
||||
|
||||
getAllIDs: function BStore_getAllIDs() {
|
||||
let items = {"menu": true,
|
||||
"toolbar": true};
|
||||
"toolbar": true,
|
||||
"unfiled": true,
|
||||
};
|
||||
// We also want "mobile" but only if a local mobile folder already exists
|
||||
// (otherwise we'll later end up creating it, which we want to avoid until
|
||||
// we actually need it.)
|
||||
if (kSpecialIds.findMobileRoot(false)) {
|
||||
items["mobile"] = true;
|
||||
}
|
||||
for each (let guid in kSpecialIds.guids) {
|
||||
if (guid != "places" && guid != "tags")
|
||||
this._getChildren(guid, items);
|
||||
|
@ -227,7 +227,7 @@ add_task(function test_restorePromptsReupload() {
|
||||
_("Verify that there's only one bookmark on the server, and it's Thunderbird.");
|
||||
// Of course, there's also the Bookmarks Toolbar and Bookmarks Menu...
|
||||
let wbos = collection.keys(function (id) {
|
||||
return ["menu", "toolbar", "mobile", folder1_guid].indexOf(id) == -1;
|
||||
return ["menu", "toolbar", "mobile", "unfiled", folder1_guid].indexOf(id) == -1;
|
||||
});
|
||||
do_check_eq(wbos.length, 1);
|
||||
do_check_eq(wbos[0], bmk2_guid);
|
||||
@ -257,7 +257,7 @@ add_task(function test_restorePromptsReupload() {
|
||||
do_check_true(found);
|
||||
|
||||
_("Have the correct number of IDs locally, too.");
|
||||
do_check_eq(count, ["menu", "toolbar", folder1_id, bmk1_id].length);
|
||||
do_check_eq(count, ["menu", "toolbar", "mobile", "unfiled", folder1_id, bmk1_id].length);
|
||||
|
||||
_("Sync again. This'll wipe bookmarks from the server.");
|
||||
try {
|
||||
@ -277,7 +277,9 @@ add_task(function test_restorePromptsReupload() {
|
||||
let folderWBOs = payloads.filter(function (wbo) {
|
||||
return ((wbo.type == "folder") &&
|
||||
(wbo.id != "menu") &&
|
||||
(wbo.id != "toolbar"));
|
||||
(wbo.id != "toolbar") &&
|
||||
(wbo.id != "unfiled") &&
|
||||
(wbo.id != "mobile"));
|
||||
});
|
||||
|
||||
do_check_eq(bookmarkWBOs.length, 1);
|
||||
|
@ -112,7 +112,7 @@ add_test(function test_annotation_uploaded() {
|
||||
try {
|
||||
engine.sync();
|
||||
let wbos = collection.keys(function (id) {
|
||||
return ["menu", "toolbar", "mobile"].indexOf(id) == -1;
|
||||
return ["menu", "toolbar", "mobile", "unfiled"].indexOf(id) == -1;
|
||||
});
|
||||
do_check_eq(wbos.length, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user