Go to the source code of this file.
|
tests | push ({description:"All smart bookmarks are created if smart bookmarks version is 0.", exec:function(){do_check_eq(bs.getIdForItemAt(bs.toolbarFolder, 0),-1);do_check_eq(bs.getIdForItemAt(bs.bookmarksMenuFolder, 0),-1);ps.setIntPref(PREF_SMART_BOOKMARKS_VERSION, 0);os.notifyObservers(null, TOPIC_PLACES_INIT_COMPLETE, null);do_check_eq(countFolderChildren(bs.toolbarFolder), SMART_BOOKMARKS_ON_TOOLBAR);do_check_eq(countFolderChildren(bs.bookmarksMenuFolder), SMART_BOOKMARKS_ON_MENU);do_check_eq(ps.getIntPref(PREF_SMART_BOOKMARKS_VERSION), SMART_BOOKMARKS_VERSION);next_test();}}) |
|
function | countFolderChildren (aFolderItemId) |
|
function | finish_test () |
|
function | next_test () |
|
function | run_test () |
|
function countFolderChildren |
( |
|
aFolderItemId | ) |
|
tests push |
( |
{description:"All smart bookmarks are created if smart bookmarks version is 0.", exec:function(){do_check_eq(bs.getIdForItemAt(bs.toolbarFolder, 0),-1);do_check_eq(bs.getIdForItemAt(bs.bookmarksMenuFolder, 0),-1);ps.setIntPref(PREF_SMART_BOOKMARKS_VERSION, 0);os.notifyObservers(null, TOPIC_PLACES_INIT_COMPLETE, null);do_check_eq(countFolderChildren(bs.toolbarFolder), SMART_BOOKMARKS_ON_TOOLBAR);do_check_eq(countFolderChildren(bs.bookmarksMenuFolder), SMART_BOOKMARKS_ON_MENU);do_check_eq(ps.getIntPref(PREF_SMART_BOOKMARKS_VERSION), SMART_BOOKMARKS_VERSION);next_test();}} |
| ) |
|
Initial value:=
Cc[
"@mozilla.org/browser/browserglue;1"].
getService(Ci.sbIFaceplateManager)
Tests that nsBrowserGlue is correctly interpreting the preferences settable by the user or by other components.
Definition at line 45 of file test_browserGlue_smartBookmarks.js.
const PREF_SMART_BOOKMARKS_VERSION = "browser.places.smartBookmarksVersion" |
const SMART_BOOKMARKS_ANNO = "Places/SmartBookmark" |
const TOPIC_PLACES_INIT_COMPLETE = "places-init-complete" |