test_browserGlue_prefs.js File Reference

Go to the source code of this file.

Functions

tests push ({description:"Import from bookmarks.html if importBookmarksHTML is true.", exec:function(){do_check_eq(bs.getIdForItemAt(bs.toolbarFolder, 0),-1);ps.setBoolPref(PREF_IMPORT_BOOKMARKS_HTML, true);os.notifyObservers(null, TOPIC_PLACES_INIT_COMPLETE, null);let itemId=bs.getIdForItemAt(bs.toolbarFolder, SMART_BOOKMARKS_ON_TOOLBAR);do_check_eq(bs.getItemTitle(itemId),"example");do_check_false(ps.getBoolPref(PREF_IMPORT_BOOKMARKS_HTML));next_test();}})
 
function finish_test ()
 
function next_test ()
 
function run_test ()
 

Variables

let bg
 
let bs
 
let ps
 
let os
 
const PREF_IMPORT_BOOKMARKS_HTML = "browser.places.importBookmarksHTML"
 
const PREF_RESTORE_DEFAULT_BOOKMARKS = "browser.bookmarks.restore_default_bookmarks"
 
const PREF_SMART_BOOKMARKS_VERSION = "browser.places.smartBookmarksVersion"
 
const PREF_AUTO_EXPORT_HTML = "browser.bookmarks.autoExportHTML"
 
const TOPIC_PLACES_INIT_COMPLETE = "places-init-complete"
 
let tests = []
 
var testIndex = 0
 

Function Documentation

function finish_test ( )

Definition at line 214 of file test_browserGlue_prefs.js.

Here is the caller graph for this function:

function next_test ( )

Definition at line 221 of file test_browserGlue_prefs.js.

Here is the call graph for this function:

Here is the caller graph for this function:

tests push ( {description:"Import from bookmarks.html if importBookmarksHTML is true.", exec:function(){do_check_eq(bs.getIdForItemAt(bs.toolbarFolder, 0),-1);ps.setBoolPref(PREF_IMPORT_BOOKMARKS_HTML, true);os.notifyObservers(null, TOPIC_PLACES_INIT_COMPLETE, null);let itemId=bs.getIdForItemAt(bs.toolbarFolder, SMART_BOOKMARKS_ON_TOOLBAR);do_check_eq(bs.getItemTitle(itemId),"example");do_check_false(ps.getBoolPref(PREF_IMPORT_BOOKMARKS_HTML));next_test();}}  )
function run_test ( )

Definition at line 238 of file test_browserGlue_prefs.js.

Here is the call graph for this function:

Variable Documentation

let 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_prefs.js.

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

Definition at line 49 of file test_browserGlue_prefs.js.

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

Definition at line 55 of file test_browserGlue_prefs.js.

const PREF_AUTO_EXPORT_HTML = "browser.bookmarks.autoExportHTML"

Definition at line 61 of file test_browserGlue_prefs.js.

const PREF_IMPORT_BOOKMARKS_HTML = "browser.places.importBookmarksHTML"

Definition at line 58 of file test_browserGlue_prefs.js.

const PREF_RESTORE_DEFAULT_BOOKMARKS = "browser.bookmarks.restore_default_bookmarks"

Definition at line 59 of file test_browserGlue_prefs.js.

const PREF_SMART_BOOKMARKS_VERSION = "browser.places.smartBookmarksVersion"

Definition at line 60 of file test_browserGlue_prefs.js.

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

Definition at line 53 of file test_browserGlue_prefs.js.

var testIndex = 0

Definition at line 220 of file test_browserGlue_prefs.js.

let tests = []

Definition at line 65 of file test_browserGlue_prefs.js.

const TOPIC_PLACES_INIT_COMPLETE = "places-init-complete"

Definition at line 63 of file test_browserGlue_prefs.js.