B2G/gecko/browser/components/places/tests/unit/test_browserGlue_smartBookmarks.js
/**
 * Rebuilds smart bookmarks listening to console output to report any message or
 * exception generated when calling ensurePlacesDefaultQueriesInitialized().
 */
Rebuilds smart bookmarks listening to console output to report any message or
exception generated when calling ensurePlacesDefaultQueriesInitialized().
Rebuilds smart bookmarks listening to console output to report any message or exception generated when calling ensurePlacesDefaultQueriesInitialized () .
function rebuildSmartBookmarks() {
  let consoleListener = {
    observe: function(aMsg) {
      print("Got console message: " + aMsg.message);
    },
    QueryInterface: XPCOMUtils.generateQI([
      Ci.nsIConsoleListener
    ]),
  };
  Services.console.reset();
  Services.console.registerListener(consoleListener);
  Cc["@mozilla.org/browser/browserglue;1"].getService(Ci.nsIBrowserGlue)
                                          .ensurePlacesDefaultQueriesInitialized();
  Services.console.unregisterListener(consoleListener);
}
function rebuildSmartBookmarks ( ) { let consoleListener = { observe : function ( aMsg ) { print ( "Got console message: " + aMsg . message ) ; } , QueryInterface : XPCOMUtils . generateQI ( [ Ci . nsIConsoleListener ] ) , } ; Services . console . reset ( ) ; Services . console . registerListener ( consoleListener ) ; Cc [ "@mozilla.org/browser/browserglue;1" ] . getService ( Ci . nsIBrowserGlue ) . ensurePlacesDefaultQueriesInitialized ( ) ; Services . console . unregisterListener ( consoleListener ) ; }
Rebuilds smart bookmarks listening to console output to report any message or
 exception generated when calling ensurePlacesDefaultQueriesInitialized().
Rebuilds smart bookmarks listening to console output to report any message or exception generated when calling ensurePlacesDefaultQueriesInitialized () .