function changeDevice(deviceInfo) {
      var deviceRow = deviceTable.querySelector(
          '#' + escapeDeviceAddress(deviceInfo.address));
      var nameForDisplayColumn = deviceRow.children[0];
      var addressColumn = deviceRow.children[1];
      var rssiColumn = deviceRow.children[2];
      var servicesColumn = deviceRow.children[3];

      expectTrue(!!nameForDisplayColumn);
      expectTrue(!!addressColumn);
      expectTrue(!!rssiColumn);
      expectTrue(!!servicesColumn);

      adapterBroker.adapterClient_.deviceChanged(deviceInfo);

      expectEquals(deviceInfo.nameForDisplay, nameForDisplayColumn.textContent);
      expectEquals(deviceInfo.address, addressColumn.textContent);

      if (deviceInfo.rssi) {
        expectEquals(String(deviceInfo.rssi.value), rssiColumn.textContent);
      }

      if (deviceInfo.services) {
        expectEquals(
            String(deviceInfo.services.length), servicesColumn.textContent);
      } else {
        expectEquals('Unknown', servicesColumn.textContent);
      }
    }
/**
     * Updates device info and verifies the contents of the device table.
     * @param {!device_collection.DeviceInfo} deviceInfo
     */
Updates device info and verifies the contents of the device table.
Updates device info and verifies the contents of the device table .
function changeDevice(deviceInfo) {
      var deviceRow = deviceTable.querySelector(
          '#' + escapeDeviceAddress(deviceInfo.address));
      var nameForDisplayColumn = deviceRow.children[0];
      var addressColumn = deviceRow.children[1];
      var rssiColumn = deviceRow.children[2];
      var servicesColumn = deviceRow.children[3];
      expectTrue(!!nameForDisplayColumn);
      expectTrue(!!addressColumn);
      expectTrue(!!rssiColumn);
      expectTrue(!!servicesColumn);
      adapterBroker.adapterClient_.deviceChanged(deviceInfo);
      expectEquals(deviceInfo.nameForDisplay, nameForDisplayColumn.textContent);
      expectEquals(deviceInfo.address, addressColumn.textContent);
      if (deviceInfo.rssi) {
        expectEquals(String(deviceInfo.rssi.value), rssiColumn.textContent);
      }
      if (deviceInfo.services) {
        expectEquals(
            String(deviceInfo.services.length), servicesColumn.textContent);
      } else {
        expectEquals('Unknown', servicesColumn.textContent);
      }
    }
function changeDevice ( deviceInfo ) { var deviceRow = deviceTable . querySelector ( '#' + escapeDeviceAddress ( deviceInfo . address ) ) ; var nameForDisplayColumn = deviceRow . children [ 0 ] ; var addressColumn = deviceRow . children [ 1 ] ; var rssiColumn = deviceRow . children [ 2 ] ; var servicesColumn = deviceRow . children [ 3 ] ; expectTrue ( ! ! nameForDisplayColumn ) ; expectTrue ( ! ! addressColumn ) ; expectTrue ( ! ! rssiColumn ) ; expectTrue ( ! ! servicesColumn ) ; adapterBroker . adapterClient_ . deviceChanged ( deviceInfo ) ; expectEquals ( deviceInfo . nameForDisplay , nameForDisplayColumn . textContent ) ; expectEquals ( deviceInfo . address , addressColumn . textContent ) ; if ( deviceInfo . rssi ) { expectEquals ( String ( deviceInfo . rssi . value ) , rssiColumn . textContent ) ; } if ( deviceInfo . services ) { expectEquals ( String ( deviceInfo . services . length ) , servicesColumn . textContent ) ; } else { expectEquals ( 'Unknown' , servicesColumn . textContent ) ; } }
Updates device info and verifies the contents of the device table.
Updates device info and verifies the contents of the device table .