B2G/gecko/toolkit/components/places/tests/queries/test_transitions.js
/*
 * Takes a query and a set of indices. The indices correspond to elements
 * of testData that are the result of the query.
 */
Takes a query and a set of indices. The indices correspond to elements
of testData that are the result of the query.
Takes a query and a set of indices . The indices correspond to elements of testData that are the result of the query .
function compareQueryToTestData(queryStr, data) {
  var query = {};
  var options = {};
  PlacesUtils.history.queryStringToQueries(queryStr, query, {}, options);
  query = query.value[0];
  options = options.value;
  var result = PlacesUtils.history.executeQuery(query, options);
  var root = result.root;
  for (var i = 0; i < data.length; i++) {
    data[i] = testData[data[i]];
    data[i].isInQuery = true;
  }
  compareArrayToResult(data, root);
}
function compareQueryToTestData ( queryStr , data ) { var query = { } ; var options = { } ; PlacesUtils . history . queryStringToQueries ( queryStr , query , { } , options ) ; query = query . value [ 0 ] ; options = options . value ; var result = PlacesUtils . history . executeQuery ( query , options ) ; var root = result . root ; for ( var i = 0 ; i < data . length ; i ++ ) { data [ i ] = testData [ data [ i ] ] ; data [ i ] . isInQuery = true ; } compareArrayToResult ( data , root ) ; }
Takes a query and a set of indices.
Takes a query and a set of indices .