Closed Bug 1374776 Opened 7 years ago Closed 7 years ago

Convert toolkit/components/places/tests/bookmarks/test_395101.js to use the new Bookmarks async API

Categories

(Toolkit :: Places, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Convert test cases to use new bookmark API based on bug 1094903 comment 8.
Comment on attachment 8879695 [details]
Bug 1374776 - Convert toolkit/components/places/tests/bookmarks/test_395101.js to use the new Bookmarks async API.

https://reviewboard.mozilla.org/r/151044/#review156128

::: toolkit/components/places/tests/bookmarks/test_search_tags.js:39
(Diff revision 1)
> -  var result = histsvc.executeQuery(query, options);
> +  var result = PlacesUtils.history.executeQuery(query, options);
>    var rootNode = result.root;
>    rootNode.containerOpen = true;
>  
>    do_check_eq(rootNode.childCount, 1);
> -  do_check_eq(rootNode.getChild(0).itemId, b1);
> +  do_check_eq(rootNode.getChild(0).itemId, bookmarkId);

you may actually use .bookmarkGuid from the node and compare with the guid, so you avoid a promiseItemId call.

::: toolkit/components/places/tests/bookmarks/xpcshell.ini:48
(Diff revision 1)
>  [test_nsINavBookmarkObserver.js]
>  [test_protectRoots.js]
>  [test_removeFolderTransaction_reinsert.js]
>  [test_removeItem.js]
>  [test_savedsearches.js]
> +[test_search_tags.js]

the test should probably be moved under the "queries" folder, it's not really about "bookmarks".

Unfortunately the current tests separation is broken, apart from very recent tests for the new async APIs and unifiedcomplete, all the rest is placed "randomly", so we may try to clean it up a bit.
Attachment #8879695 - Flags: review?(mak77) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a8472f434c2d
Convert toolkit/components/places/tests/bookmarks/test_395101.js to use the new Bookmarks async API. r=mak
https://hg.mozilla.org/mozilla-central/rev/a8472f434c2d
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: