This document contains a simple preliminary description of testcases on Bookmarks interface of Webclient API.

1. Tests on addBookmark(BookmarkEntry) method.

Test IDActionExpected Result
basic/api/History_addBookmark:0Method addBookmark() invoked and try to add to Bookmarks new Leaf with correct StringMozilla doesn't crashes and added one leaf to Bookmarks
basic/api/History_addBookmark:1Method addBookmark() invoked and try to add to Bookmarks new folder with correct StringMozilla doesn't crashes and added one folder to Bookmarks
basic/api/History_addBookmark:2Method addBookmark() invoked and try to add to Bookmarks new Leaf with name=nullMozilla doesn't crashes and added one leaf to Bookmarks
basic/api/History_addBookmark:3Method addBookmark() invoked and try to add to Bookmarks new folder with name=nullMozilla doesn't crashes and added one folder to Bookmarks
basic/api/History_addBookmark:4Method addBookmark() invoked and try to add to Bookmarks new Leaf with name=""Mozilla doesn't crashes and added one leaf to Bookmarks
basic/api/History_addBookmark:5Method addBookmark() invoked and try to add to Bookmarks new folder with name=""Mozilla doesn't crashes and added one folder to Bookmarks

2. Tests on getBookmarks() method.

Test IDActionExpected Result
basic/api/History_getBookmarks:0Method getBookmarks() invokedMozilla doesn't crash and getBookmarks() return correct Bookmarks

3. Tests on newBookmarkEntry(String) method.

Test IDActionExpected Result
basic/api/History_newBookmarkEntry:0Method newBookmarkEntry(String) invoked with correct url stringMozilla doesn't crashes and creates a new bookmark leaf with correct URL
basic/api/History_newBookmarkEntry:1Method newBookmarkEntry(String) invoked with string == nullMozilla doesn't crashes and creates a new bookmark leaf with URL==null
basic/api/History_newBookmarkEntry:2Method newBookmarkEntry(String) invoked with empty url stringMozilla doesn't crashes and creates a new bookmark leaf with empty URL

4. Tests on newBookmarkFolder(String) method.

Test IDActionExpected Result
basic/api/History_newBookmarkFolder:0Method newBookmarkFolder(String) invoked with correctly formed string Mozilla doesn't crashes and creates a new bookmark folder with name == string
basic/api/History_newBookmarkFolder:1Method newBookmarkFolder(String) invoked with string == nullMozilla doesn't crashes and creates a new bookmark folder with name == null
basic/api/History_newBookmarkFolder:2Method newBookmarkFolder(String) invoked with empty string Mozilla doesn't crashes and creates a new bookmark folder with name == emplty string

5. Tests on removeBookmark(BookmarkEntry) method.

Test IDActionExpected Result
basic/api/History_removeBookmark:0Method removeBookmark(BookmarkEntry) invoked when BookmarkEntry is nullMozilla doesn't crashes and remove leaf BookmarkEntry from Bookamarks
basic/api/History_removeBookmark:1Method removeBookmark(BookmarkEntry) invoked when BookmarkEntry is correct entry from TreeModelMozilla doesn't crashes and remove folder BookmarkEntry from Bookamarks
basic/api/History_removeBookmark:2Method removeBookmark(BookmarkEntry) invoked when BookmarkEntry is unexist in TreeModelMozilla doesn't crashes and remove folder BookmarkEntry from Bookamarks