Closed Bug 1428760 Opened 6 years ago Closed 6 years ago

Tidy up browser_bookmarkProperties_*.js tests and stop using some obsolete APIs

Categories

(Firefox :: Bookmarks & History, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

I'm currently working on fixing tests for bug 1423896. I noticed that browser_bookmarkProperties_readOnlyRoot.js uses an obsolete API (getItemTitle) so we should clean that up.

It also uses PlacesUIUtils.leftPaneQueries.UnfiledBookmarks which will be removed as well, and that can be changed in advance.

As an added bonus, I also changed is -> Assert.equals, and ok -> Assert.ok as they provide better output for the tests so that you can more easily see what the values are when they pass.
Comment on attachment 8940697 [details]
Bug 1428760 - Tidy up browser_bookmarkProperties_*.js tests and stop using some obsolete APIs.

https://reviewboard.mozilla.org/r/210958/#review216776

::: browser/components/places/tests/browser/browser_bookmarkProperties_readOnlyRoot.js:36
(Diff revision 1)
> -           "Root title is correct");
>          // Check the shortcut's title.
> -        let bookmark = await PlacesUtils.bookmarks.fetch(tree.selectedNode.bookmarkGuid);
> -        is(bookmark.title, "",
> +        info(tree.selectedNode.bookmarkGuid);
> +        bookmark = await PlacesUtils.bookmarks.fetch(tree.selectedNode.bookmarkGuid);
> +        Assert.equal(bookmark.title, "",
>             "Shortcut title is null");

nit: can be onelined
Attachment #8940697 - Flags: review?(mak77) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd18db6ffcb0
Tidy up browser_bookmarkProperties_*.js tests and stop using some obsolete APIs. r=mak
Priority: -- → P3
https://hg.mozilla.org/mozilla-central/rev/dd18db6ffcb0
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: