function checkDisplay(hostResolverInfo) {
  expectEquals(
      hostResolverInfo.cache.capacity,
      parseInt($(DnsView.CAPACITY_SPAN_ID).innerText));

  var entries = hostResolverInfo.cache.entries;

  // Don't check exact displayed values, to avoid any races, but make sure
  // values are non-negative and have the correct sum.
  var active = parseInt($(DnsView.ACTIVE_SPAN_ID).innerText);
  var expired = parseInt($(DnsView.EXPIRED_SPAN_ID).innerText);
  expectLE(0, active);
  expectLE(0, expired);
  expectEquals(entries.length, active + expired);

  var tableId = DnsView.CACHE_TBODY_ID;
  NetInternalsTest.checkTbodyRows(tableId, entries.length);

  // Rather than check the exact string in every position, just make sure every
  // entry is not empty, and does not have 'undefined' anywhere, which should
  // find a fair number of potential output errors, without duplicating the
  // entire corresponding function of DnsView.
  for (var row = 0; row < entries.length; ++row) {
    for (column = 0; column < 4; ++column) {
      var text = NetInternalsTest.getTbodyText(tableId, row, column);
      expectNotEquals(text, '');
      expectFalse(/undefined/i.test(text));
    }
  }
}
/**
 * Checks the display on the DNS tab against the information it should be
 * displaying.
 * @param {object} hostResolverInfo Results from a host resolver info query.
 */
Checks the display on the DNS tab against the information it should be
displaying.
@param {object} hostResolverInfo Results from a host resolver info query.
Checks the display on the DNS tab against the information it should be displaying . @param { object } hostResolverInfo Results from a host resolver info query .
function checkDisplay(hostResolverInfo) {
  expectEquals(
      hostResolverInfo.cache.capacity,
      parseInt($(DnsView.CAPACITY_SPAN_ID).innerText));
  var entries = hostResolverInfo.cache.entries;
  var active = parseInt($(DnsView.ACTIVE_SPAN_ID).innerText);
  var expired = parseInt($(DnsView.EXPIRED_SPAN_ID).innerText);
  expectLE(0, active);
  expectLE(0, expired);
  expectEquals(entries.length, active + expired);
  var tableId = DnsView.CACHE_TBODY_ID;
  NetInternalsTest.checkTbodyRows(tableId, entries.length);
  for (var row = 0; row < entries.length; ++row) {
    for (column = 0; column < 4; ++column) {
      var text = NetInternalsTest.getTbodyText(tableId, row, column);
      expectNotEquals(text, '');
      expectFalse(/undefined/i.test(text));
    }
  }
}
function checkDisplay ( hostResolverInfo ) { expectEquals ( hostResolverInfo . cache . capacity , parseInt ( $ ( DnsView . CAPACITY_SPAN_ID ) . innerText ) ) ; var entries = hostResolverInfo . cache . entries ; var active = parseInt ( $ ( DnsView . ACTIVE_SPAN_ID ) . innerText ) ; var expired = parseInt ( $ ( DnsView . EXPIRED_SPAN_ID ) . innerText ) ; expectLE ( 0 , active ) ; expectLE ( 0 , expired ) ; expectEquals ( entries . length , active + expired ) ; var tableId = DnsView . CACHE_TBODY_ID ; NetInternalsTest . checkTbodyRows ( tableId , entries . length ) ; for ( var row = 0 ; row < entries . length ; ++ row ) { for ( column = 0 ; column < 4 ; ++ column ) { var text = NetInternalsTest . getTbodyText ( tableId , row , column ) ; expectNotEquals ( text , '' ) ; expectFalse ( / undefined / i . test ( text ) ) ; } } }
Checks the display on the DNS tab against the information it should be
 displaying.
Checks the display on the DNS tab against the information it should be displaying .
// Don't check exact displayed values, to avoid any races, but make sure // values are non-negative and have the correct sum. // Rather than check the exact string in every position, just make sure every // entry is not empty, and does not have 'undefined' anywhere, which should // find a fair number of potential output errors, without duplicating the // entire corresponding function of DnsView.