B2G/gecko/toolkit/mozapps/extensions/test/browser/browser_searching.js
/*
 * Check results of a search with different filterings
 *
 * @param  aQuery
 *         The search query used
 * @param  aSortBy
 *         How the results are sorted (e.g. "name")
 * @param  aReverseOrder
 *         Boolean representing if the results are in reverse default order
 */
Check results of a search with different filterings
@param  aQuery
The search query used
@param  aSortBy
How the results are sorted
@param  aReverseOrder
Boolean representing if the results are in reverse default order
Check results of a search with different filterings @param aQuery The search query used @param aSortBy How the results are sorted @param aReverseOrder Boolean representing if the results are in reverse default order
function check_filtered_results(aQuery, aSortBy, aReverseOrder) {
  var localFilter = gManagerWindow.document.getElementById("search-filter-local");
  var remoteFilter = gManagerWindow.document.getElementById("search-filter-remote");
  var list = gManagerWindow.document.getElementById("search-list");
  list.ensureElementIsVisible(localFilter);
  EventUtils.synthesizeMouseAtCenter(localFilter, { }, gManagerWindow);
  check_results(aQuery, aSortBy, aReverseOrder, true);
  EventUtils.synthesizeMouseAtCenter(remoteFilter, { }, gManagerWindow);
  check_results(aQuery, aSortBy, aReverseOrder, false);
}
function check_filtered_results ( aQuery , aSortBy , aReverseOrder ) { var localFilter = gManagerWindow . document . getElementById ( "search-filter-local" ) ; var remoteFilter = gManagerWindow . document . getElementById ( "search-filter-remote" ) ; var list = gManagerWindow . document . getElementById ( "search-list" ) ; list . ensureElementIsVisible ( localFilter ) ; EventUtils . synthesizeMouseAtCenter ( localFilter , { } , gManagerWindow ) ; check_results ( aQuery , aSortBy , aReverseOrder , true ) ; EventUtils . synthesizeMouseAtCenter ( remoteFilter , { } , gManagerWindow ) ; check_results ( aQuery , aSortBy , aReverseOrder , false ) ; }
Check results of a search with different filterings
 @param  aQuery
         The search query used
 @param  aSortBy
         How the results are sorted (e.g.
Check results of a search with different filterings @param aQuery The search query used @param aSortBy How the results are sorted ( e . g .
// Check with showing local add-ons // Check with showing remote add-ons