B2G/gecko/testing/mochitest/server.js
/**
 * Respond to requests that match a file system directory.
 * Under the tests/ directory, return a test harness page.
 */
Respond to requests that match a file system directory.
Under the tests/ directory, return a test harness page.
Respond to requests that match a file system directory . Under the tests / directory return a test harness page .
function defaultDirHandler(metadata, response)
{
  response.setStatusLine("1.1", 200, "OK");
  response.setHeader("Content-type", "text/html", false);
  try {
    if (metadata.path.indexOf("/tests") != 0) {
      regularListing(metadata, response);
    } else {
      testListing(metadata, response);
    }
  } catch (ex) {
    response.write(ex);
  }  
}
function defaultDirHandler ( metadata , response ) { response . setStatusLine ( "1.1" , 200 , "OK" ) ; response . setHeader ( "Content-type" , "text/html" , false ) ; try { if ( metadata . path . indexOf ( "/tests" ) != 0 ) { regularListing ( metadata , response ) ; } else { testListing ( metadata , response ) ; } } catch ( ex ) { response . write ( ex ) ; } }
Respond to requests that match a file system directory.
Respond to requests that match a file system directory .