Bug 1337480 - Remove undefined variables in test_417228-other-roots.js as they aren't needed. r?mak
MozReview-Commit-ID: 6h6dAGRxsJm
--- a/toolkit/components/places/tests/bookmarks/test_417228-other-roots.js
+++ b/toolkit/components/places/tests/bookmarks/test_417228-other-roots.js
@@ -15,17 +15,16 @@ var myTest = {
validate: function () { ... query for your bookmarks ... }
}
this.push(myTest);
*/
tests.push({
- excludeItemsFromRestore: [],
populate: function populate() {
// check initial size
var rootNode = PlacesUtils.getFolderContents(PlacesUtils.placesRootId,
false, false).root;
do_check_eq(rootNode.childCount, 5);
// create a test root
this._folderTitle = "test folder";
@@ -54,17 +53,16 @@ tests.push({
// add a folder to exclude from replacing during restore
// this will still be present post-restore
var excludedFolderId =
PlacesUtils.bookmarks.createFolder(PlacesUtils.placesRootId,
"excluded",
PlacesUtils.bookmarks.DEFAULT_INDEX);
do_check_eq(rootNode.childCount, 7);
- this.excludeItemsFromRestore.push(excludedFolderId);
// add a test bookmark to it
PlacesUtils.bookmarks.insertBookmark(excludedFolderId, this._testURI,
PlacesUtils.bookmarks.DEFAULT_INDEX, "test");
},
inbetween: function inbetween() {
// add some items that should be removed by the restore
@@ -129,19 +127,16 @@ add_task(function* () {
// make json file
let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
// populate db
tests.forEach(function(aTest) {
aTest.populate();
// sanity
aTest.validate();
-
- if (aTest.excludedItemsFromRestore)
- excludedItemsFromRestore = excludedItems.concat(aTest.excludedItemsFromRestore);
});
yield BookmarkJSONUtils.exportToFile(jsonFile);
tests.forEach(function(aTest) {
aTest.inbetween();
});