browser/components/places/tests/unit/test_browserGlue_bookmarkshtml.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

michael@0 1 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* vim:set ts=2 sw=2 sts=2 et: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 /**
michael@0 8 * Tests that nsBrowserGlue correctly exports bookmarks.html at shutdown if
michael@0 9 * browser.bookmarks.autoExportHTML is set to true.
michael@0 10 */
michael@0 11
michael@0 12 function run_test() {
michael@0 13 run_next_test();
michael@0 14 }
michael@0 15
michael@0 16 add_task(function* () {
michael@0 17 remove_bookmarks_html();
michael@0 18
michael@0 19 Services.prefs.setBoolPref("browser.bookmarks.autoExportHTML", true);
michael@0 20 do_register_cleanup(() => Services.prefs.clearUserPref("browser.bookmarks.autoExportHTML"));
michael@0 21
michael@0 22 // Initialize nsBrowserGlue before Places.
michael@0 23 Cc["@mozilla.org/browser/browserglue;1"].getService(Ci.nsIBrowserGlue);
michael@0 24
michael@0 25 // Initialize Places through the History Service.
michael@0 26 Cc["@mozilla.org/browser/nav-history-service;1"]
michael@0 27 .getService(Ci.nsINavHistoryService);
michael@0 28
michael@0 29 Services.obs.addObserver(function observer() {
michael@0 30 Services.obs.removeObserver(observer, "profile-before-change");
michael@0 31 check_bookmarks_html();
michael@0 32 }, "profile-before-change", false);
michael@0 33 });

mercurial