function assertAllIndicesPopulated(targetTable, rows) {
  var tx = backStore.createTx(lf.TransactionType.READ_ONLY, [table]);

  var tableIndices = targetTable.getIndices();
  var promises = tableIndices.map(function(indexSchema) {
    var indexName = indexSchema.getNormalizedName();
    return tx.getTable(
        indexName, lf.Row.deserialize, lf.backstore.TableType.INDEX).get([]);
  });
  promises.push(tx.getTable(
      targetTable.getRowIdIndexName(),
      lf.Row.deserialize,
      lf.backstore.TableType.INDEX).get([]));

  return goog.Promise.all(promises).then(function(results) {
    var rowIdIndexResults = results.splice(results.length - 1, 1)[0];
    assertRowIdIndex(targetTable, rowIdIndexResults, rows.length);

    results.forEach(function(indexResults, i) {
      var indexSchema = tableIndices[i];
      assertIndexContents(indexSchema, indexResults, rows);
    });
  });
}
Asserts that all indices are populated with the given rows.
@param {!lf.schema.Table} targetTable
@param {!Array<!lf.Row>} rows The only rows that should be present in the
    persistent index tables.
@return {!IThenable} A signal that assertions finished.