B2G/gecko/toolkit/components/places/tests/queries/test_tags.js
/**
 * Ensures that the URIs of aResultRoot are the same as those in aExpectedURIs.
 *
 * @param aResultRoot
 *        The nsINavHistoryContainerResultNode root of an nsINavHistoryResult
 * @param aExpectedURIs
 *        Array of URIs (as strings) that aResultRoot should contain
 */
Ensures that the URIs of aResultRoot are the same as those in aExpectedURIs.
Ensures that the URIs of aResultRoot are the same as those in aExpectedURIs .
function queryResultsAre(aResultRoot, aExpectedURIs) {
  var rootWasOpen = aResultRoot.containerOpen;
  if (!rootWasOpen)
    aResultRoot.containerOpen = true;
  var actualURIs = [];
  for (let i = 0; i < aResultRoot.childCount; i++) {
    actualURIs.push(aResultRoot.getChild(i).uri);
  }
  setsAreEqual(actualURIs, aExpectedURIs);
  if (!rootWasOpen)
    aResultRoot.containerOpen = false;
}
function queryResultsAre ( aResultRoot , aExpectedURIs ) { var rootWasOpen = aResultRoot . containerOpen ; if ( ! rootWasOpen ) aResultRoot . containerOpen = true ; var actualURIs = [ ] ; for ( let i = 0 ; i < aResultRoot . childCount ; i ++ ) { actualURIs . push ( aResultRoot . getChild ( i ) . uri ) ; } setsAreEqual ( actualURIs , aExpectedURIs ) ; if ( ! rootWasOpen ) aResultRoot . containerOpen = false ; }
Ensures that the URIs of aResultRoot are the same as those in aExpectedURIs.
Ensures that the URIs of aResultRoot are the same as those in aExpectedURIs .