Closed
Bug 1432425
Opened 7 years ago
Closed 7 years ago
Refactor tests using removeFolderChildren
Categories
(Toolkit :: Places, enhancement, P2)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla60
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | fixed |
People
(Reporter: mak, Assigned: mak)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxsearch])
Attachments
(1 file)
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=
| Assignee | ||
Updated•7 years ago
|
Whiteboard: [fx-search] → [fxsearch]
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 2•7 years ago
|
||
Kit, could you please check that I didn't remove some important coverage from the Sync tests?
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Comment 3•7 years ago
|
||
| mozreview-review | ||
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 4•7 years ago
|
||
| mozreview-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+
| Comment hidden (mozreview-request) |
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/399e3160763a
Remove synchronous Bookmarks::RemoveFolderChildren. r=kitcambridge,standard8
Comment 7•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•