Closed Bug 1432425 Opened 2 years ago Closed 2 years ago
Refactor tests using remove
59 bytes, text/x-review-board-request
Some of the tests are using removeFolderChildren, that in the new API doesn't exist. We should refactor those. https://searchfox.org/mozilla-central/search?q=removeFolderChildren&path=
Kit, could you please check that I didn't remove some important coverage from the Sync tests?
Comment on attachment 8953968 [details] Bug 1432425 - Remove synchronous Bookmarks::RemoveFolderChildren. https://reviewboard.mozilla.org/r/223124/#review229062
Attachment #8953968 - Flags: review?(standard8) → review+
Comment on attachment 8953968 [details] Bug 1432425 - Remove synchronous Bookmarks::RemoveFolderChildren. https://reviewboard.mozilla.org/r/223124/#review229158 I have a suggestion to tweak the test, but it's up to you. Thanks! ::: services/sync/tests/unit/test_bookmark_tracker.js:428 (Diff revision 1) > > Assert.equal(createdIDs.length, numItems); > await verifyTrackedCount(numItems + 1); // the folder is also tracked. > await resetTracker(); > > - PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.bookmarks.unfiledBookmarksFolder); > + await PlacesUtils.bookmarks.eraseEverything(); Since we already have `test_async_onItemDeleted_eraseEverything`, I'd prefer we change this test to create a folder with some bookmarks, call `PlacesUtils.bookmarks.remove(folderGuid)`, then verify we track the folder and all its children. ::: toolkit/components/places/tests/sync/xpcshell.ini:15 (Diff revision 1) > [test_bookmark_deletion.js] > [test_bookmark_haschanges.js] > [test_bookmark_kinds.js] > [test_bookmark_structure_changes.js] > [test_bookmark_value_changes.js] > +[test_sync_utils.js] Cool. :-)
Attachment #8953968 - Flags: review?(kit) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/399e3160763a Remove synchronous Bookmarks::RemoveFolderChildren. r=kitcambridge,standard8
You need to log in before you can comment on or make changes to this bug.