B2G/gecko/browser/components/downloads/test/unit/test_DownloadsCommon.js
/**
 * Tests for the functions located directly in the "DownloadsCommon" object.
 */
Tests for the functions located directly in the "DownloadsCommon" object.
Tests for the functions located directly in the " DownloadsCommon " object .
function testFormatTimeLeft(aSeconds, aExpectedValue, aExpectedUnitString)
{
  let expected = "";
  if (aExpectedValue) {
    expected = DownloadsCommon.strings[aExpectedUnitString](aExpectedValue);
  }
  do_check_eq(DownloadsCommon.formatTimeLeft(aSeconds), expected);
}
function testFormatTimeLeft ( aSeconds , aExpectedValue , aExpectedUnitString ) { let expected = "" ; if ( aExpectedValue ) { expected = DownloadsCommon . strings [ aExpectedUnitString ] ( aExpectedValue ) ; } do_check_eq ( DownloadsCommon . formatTimeLeft ( aSeconds ) , expected ) ; }
Tests for the functions located directly in the "DownloadsCommon" object.
Tests for the functions located directly in the " DownloadsCommon " object .
// Format the expected result based on the current language.