B2G/gecko/toolkit/components/search/tests/xpcshell/head_search.js
/**
 * Run some callback once metadata has been committed to disk.
 */
Run some callback once metadata has been committed to disk.
Run some callback once metadata has been committed to disk .
function afterCommit(callback)
{
  let obs = function(result, topic, verb) {
    if (verb == "write-metadata-to-disk-complete") {
      Services.obs.removeObserver(obs, topic);
      callback(result);
    } else {
      dump("TOPIC: " + topic+ "\n");
    }
  }
  Services.obs.addObserver(obs, "browser-search-service", false);
}
function afterCommit ( callback ) { let obs = function ( result , topic , verb ) { if ( verb == "write-metadata-to-disk-complete" ) { Services . obs . removeObserver ( obs , topic ) ; callback ( result ) ; } else { dump ( "TOPIC: " + topic + "\n" ) ; } } Services . obs . addObserver ( obs , "browser-search-service" , false ) ; }
Run some callback once metadata has been committed to disk.
Run some callback once metadata has been committed to disk .