Go to the source code of this file.
Functions | |
Components utils | import ("resource://gre/modules/utils.js") |
function | addBookmarks () |
function | checkBookmarksExist () |
function | createFile (aBasename) |
function | doNextTest () |
function | run_test () |
Variables | |
const | NSIOBSERVER_TOPIC_BEGIN = "bookmarks-restore-begin" |
const | NSIOBSERVER_TOPIC_SUCCESS = "bookmarks-restore-success" |
const | NSIOBSERVER_TOPIC_FAILED = "bookmarks-restore-failed" |
const | NSIOBSERVER_DATA_JSON = "json" |
const | NSIOBSERVER_DATA_HTML = "html" |
const | NSIOBSERVER_DATA_HTML_INIT = "html-initial" |
var | uris |
var | tests |
var | beginObserver |
var | successAndFailedObserver |
var | currTestIndex = -1 |
var | bmsvc |
var | obssvc |
var | importer |
function addBookmarks | ( | ) |
Adds some bookmarks for the URIs in |uris|.
Definition at line 373 of file test_bookmarksRestoreNotification.js.
function checkBookmarksExist | ( | ) |
Checks that all of the bookmarks created for |uris| exist. It works by creating one query per URI and then ORing all the queries. The number of results returned should be uris.length.
Definition at line 386 of file test_bookmarksRestoreNotification.js.
function createFile | ( | aBasename | ) |
Creates an nsILocalFile in the profile directory.
aBasename | e.g., "foo.txt" in the path /some/long/path/foo.txt |
Definition at line 409 of file test_bookmarksRestoreNotification.js.
function doNextTest | ( | ) |
Runs the next test or if all tests have been run, finishes.
Definition at line 423 of file test_bookmarksRestoreNotification.js.
Components utils import | ( | "resource://gre/modules/utils.js" | ) |
function run_test | ( | ) |
Definition at line 440 of file test_bookmarksRestoreNotification.js.
var beginObserver |
Definition at line 304 of file test_bookmarksRestoreNotification.js.
var bmsvc |
Definition at line 359 of file test_bookmarksRestoreNotification.js.
var currTestIndex = -1 |
Definition at line 354 of file test_bookmarksRestoreNotification.js.
var importer |
Definition at line 365 of file test_bookmarksRestoreNotification.js.
const NSIOBSERVER_DATA_HTML = "html" |
Definition at line 49 of file test_bookmarksRestoreNotification.js.
const NSIOBSERVER_DATA_HTML_INIT = "html-initial" |
Definition at line 50 of file test_bookmarksRestoreNotification.js.
const NSIOBSERVER_DATA_JSON = "json" |
Definition at line 48 of file test_bookmarksRestoreNotification.js.
const NSIOBSERVER_TOPIC_BEGIN = "bookmarks-restore-begin" |
Tests the bookmarks-restore-* nsIObserver notifications after restoring bookmarks from JSON and HTML. See bug 470314.
Definition at line 45 of file test_bookmarksRestoreNotification.js.
const NSIOBSERVER_TOPIC_FAILED = "bookmarks-restore-failed" |
Definition at line 47 of file test_bookmarksRestoreNotification.js.
const NSIOBSERVER_TOPIC_SUCCESS = "bookmarks-restore-success" |
Definition at line 46 of file test_bookmarksRestoreNotification.js.
var obssvc |
Definition at line 362 of file test_bookmarksRestoreNotification.js.
var successAndFailedObserver |
Definition at line 322 of file test_bookmarksRestoreNotification.js.
var tests |
Definition at line 73 of file test_bookmarksRestoreNotification.js.
var uris |
Definition at line 53 of file test_bookmarksRestoreNotification.js.