Bug 1337480 - Remove undefined variables in test_417228-other-roots.js as they aren't needed. r?mak draft
authorMark Banner <standard8@mozilla.com>
Wed, 08 Feb 2017 21:43:22 +0000
changeset 480749 c8c10b642958ce4587e72d18136e9d6dec91631a
parent 480508 3a95aa4246653a7863914ffec032897d13359fb0
child 545048 7da609647274c72f420d689014679ce55ae5f3b3
push id44648
push userbmo:standard8@mozilla.com
push dateWed, 08 Feb 2017 21:56:30 +0000
reviewersmak
bugs1337480
milestone54.0a1
Bug 1337480 - Remove undefined variables in test_417228-other-roots.js as they aren't needed. r?mak MozReview-Commit-ID: 6h6dAGRxsJm
toolkit/components/places/tests/bookmarks/test_417228-other-roots.js
--- 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();
   });