test_browserGlue_smartBookmarks.js File Reference

Go to the source code of this file.

Functions

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 ()
 

Variables

var bg
 
var hs
 
var bs
 
var ps
 
var os
 
var as
 
const PREF_SMART_BOOKMARKS_VERSION = "browser.places.smartBookmarksVersion"
 
const SMART_BOOKMARKS_ANNO = "Places/SmartBookmark"
 
const TOPIC_PLACES_INIT_COMPLETE = "places-init-complete"
 
var tests = []
 
var testIndex = 0
 

Function Documentation

function countFolderChildren (   aFolderItemId)

Definition at line 182 of file test_browserGlue_smartBookmarks.js.

function finish_test ( )

Definition at line 193 of file test_browserGlue_smartBookmarks.js.

Here is the call graph for this function:

function next_test ( )

Definition at line 202 of file test_browserGlue_smartBookmarks.js.

Here is the caller graph for this function:

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 run_test ( )

Definition at line 216 of file test_browserGlue_smartBookmarks.js.

Here is the call graph for this function:

Variable Documentation

var as
Initial value:
= Cc["@mozilla.org/browser/annotation-service;1"].
getService(Ci.nsIAnnotationService)
const Cc
getService(Ci.sbIFaceplateManager)
const Ci

Definition at line 59 of file test_browserGlue_smartBookmarks.js.

var bg
Initial value:
= Cc["@mozilla.org/browser/browserglue;1"].
getService(Ci.nsIBrowserGlue)
const Cc
getService(Ci.sbIFaceplateManager)
const Ci

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.

var bs
Initial value:
= Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService)
const Cc
getService(Ci.sbIFaceplateManager)
const Ci

Definition at line 51 of file test_browserGlue_smartBookmarks.js.

var hs
Initial value:
= Cc["@mozilla.org/browser/nav-history-service;1"].
getService(Ci.nsINavHistoryService)
const Cc
getService(Ci.sbIFaceplateManager)
const Ci

Definition at line 49 of file test_browserGlue_smartBookmarks.js.

var os
Initial value:
= Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService)
const Cc
getService(Ci.sbIFaceplateManager)
const Ci

Definition at line 57 of file test_browserGlue_smartBookmarks.js.

const PREF_SMART_BOOKMARKS_VERSION = "browser.places.smartBookmarksVersion"

Definition at line 62 of file test_browserGlue_smartBookmarks.js.

var ps
Initial value:
= Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch)
const Cc
getService(Ci.sbIFaceplateManager)
const Ci

Definition at line 55 of file test_browserGlue_smartBookmarks.js.

const SMART_BOOKMARKS_ANNO = "Places/SmartBookmark"

Definition at line 63 of file test_browserGlue_smartBookmarks.js.

var testIndex = 0

Definition at line 201 of file test_browserGlue_smartBookmarks.js.

var tests = []

Definition at line 67 of file test_browserGlue_smartBookmarks.js.

const TOPIC_PLACES_INIT_COMPLETE = "places-init-complete"

Definition at line 65 of file test_browserGlue_smartBookmarks.js.