B2G/gecko/storage/test/unit/test_locale_collation.js
/**
 * Gets the results from the given database using the given collation and
 * ensures that they match gStrings sorted by the same collation.
 *
 * @param aCollation
 *        The name of one of our custom locale collations.  The rows from the
 *        database and the expected results are ordered by this collation.
 * @param aConn
 *        A connection to either the UTF-8 database or the UTF-16 database.
 */
Gets the results from the given database using the given collation and
ensures that they match gStrings sorted by the same collation.

@param aCollation
The name of one of our custom locale collations.  The rows from the
database and the expected results are ordered by this collation.
@param aConn
A connection to either the UTF-8 database or the UTF-16 database.
Gets the results from the given database using the given collation and ensures that they match gStrings sorted by the same collation . @param aCollation The name of one of our custom locale collations . The rows from the database and the expected results are ordered by this collation . @param aConn A connection to either the UTF - 8 database or the UTF - 16 database .
function runTest(aCollation, aConn)
{
  ensureResultsAreCorrect(getResults(aCollation, aConn),
                          gStrings.slice(0).sort(localeCompare(aCollation)));
}
function runTest ( aCollation , aConn ) { ensureResultsAreCorrect ( getResults ( aCollation , aConn ) , gStrings . slice ( 0 ) . sort ( localeCompare ( aCollation ) ) ) ; }
Gets the results from the given database using the given collation and
 ensures that they match gStrings sorted by the same collation.
Gets the results from the given database using the given collation and ensures that they match gStrings sorted by the same collation .