45 let
bg =
Cc[
"@mozilla.org/browser/browserglue;1"].
49 let
bs =
Cc[
"@mozilla.org/browser/nav-bookmarks-service;1"].
53 let
ps =
Cc[
"@mozilla.org/preferences-service;1"].
55 let
os =
Cc[
"@mozilla.org/observer-service;1"].
67 description:
"Export to bookmarks.html if autoExportHTML is true.",
70 do_check_true(
bs.getIdForItemAt(
bs.toolbarFolder, 0) > 0);
93 description:
"Export to bookmarks.html if autoExportHTML is true and a bookmarks.html exists.",
96 do_check_true(
bs.getIdForItemAt(
bs.toolbarFolder, 0) > 0);
102 let lastMod = profileBookmarksHTMLFile.lastModifiedTime;
103 let fileSize = profileBookmarksHTMLFile.fileSize;
111 do_check_neq(profileBookmarksHTMLFile.fileSize, fileSize);
125 description:
"Backup to JSON should be a no-op if a backup for today already exists.",
128 do_check_true(
bs.getIdForItemAt(
bs.toolbarFolder, 0) > 0);
132 let lastMod = profileBookmarksJSONFile.lastModifiedTime;
133 let fileSize = profileBookmarksJSONFile.fileSize;
138 do_check_true(profileBookmarksJSONFile.exists());
139 do_check_eq(profileBookmarksJSONFile.lastModifiedTime, lastMod);
140 do_check_eq(profileBookmarksJSONFile.fileSize, fileSize);
161 dump(
"\nTEST " + (++testIndex) +
": " + test.description);
170 bs.insertBookmark(
bs.bookmarksMenuFolder,
uri(
"http://mozilla.org/"),
171 bs.DEFAULT_INDEX,
"bookmark-on-menu");
172 bs.insertBookmark(
bs.toolbarFolder,
uri(
"http://mozilla.org/"),
173 bs.DEFAULT_INDEX,
"bookmark-on-toolbar");
do_check_eq(typeof PlacesUtils,"object")
const TOPIC_QUIT_APPLICATION_GRANTED
const PREF_AUTO_EXPORT_HTML
function create_bookmarks_html(aFilename)
function remove_all_bookmarks()
getService(Ci.sbIFaceplateManager)
function check_JSON_backup()
function remove_all_JSON_backups()
function create_JSON_backup(aFilename)
function remove_bookmarks_html()
function check_bookmarks_html()