function validatePasswordList(listElement, passwordList) {
    assertEquals(passwordList.length, listElement.items.length);
    if (passwordList.length > 0) {
      // The first child is a template, skip and get the real 'first child'.
      const node = Polymer.dom(listElement).children[1];
      assert(node);
      const passwordInfo = passwordList[0];
      assertEquals(
          passwordInfo.loginPair.urls.shown,
          node.$$('#originUrl').textContent.trim());
      assertEquals(
          passwordInfo.loginPair.urls.link, node.$$('#originUrl').href);
      assertEquals(passwordInfo.loginPair.username, node.$$('#username').value);
      assertEquals(
          passwordInfo.numCharactersInPassword,
          node.$$('#password').value.length);
    }
  }
/**
   * Helper method that validates a that elements in the password list match
   * the expected data.
   * @param {!Element} listElement The iron-list element that will be checked.
   * @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList The
   *     expected data.
   * @private
   */
Helper method that validates a that elements in the password list match
the expected data.
@param {!Element} listElement The iron-list element that will be checked.
@param {!Array} passwordList The
expected data.
@private
Helper method that validates a that elements in the password list match the expected data . @param { !Element } listElement The iron - list element that will be checked . @param { !Array } passwordList The expected data . @private
function validatePasswordList(listElement, passwordList) {
    assertEquals(passwordList.length, listElement.items.length);
    if (passwordList.length > 0) {
      const node = Polymer.dom(listElement).children[1];
      assert(node);
      const passwordInfo = passwordList[0];
      assertEquals(
          passwordInfo.loginPair.urls.shown,
          node.$$('#originUrl').textContent.trim());
      assertEquals(
          passwordInfo.loginPair.urls.link, node.$$('#originUrl').href);
      assertEquals(passwordInfo.loginPair.username, node.$$('#username').value);
      assertEquals(
          passwordInfo.numCharactersInPassword,
          node.$$('#password').value.length);
    }
  }
function validatePasswordList ( listElement , passwordList ) { assertEquals ( passwordList . length , listElement . items . length ) ; if ( passwordList . length > 0 ) { const node = Polymer . dom ( listElement ) . children [ 1 ] ; assert ( node ) ; const passwordInfo = passwordList [ 0 ] ; assertEquals ( passwordInfo . loginPair . urls . shown , node . $$ ( '#originUrl' ) . textContent . trim ( ) ) ; assertEquals ( passwordInfo . loginPair . urls . link , node . $$ ( '#originUrl' ) . href ) ; assertEquals ( passwordInfo . loginPair . username , node . $$ ( '#username' ) . value ) ; assertEquals ( passwordInfo . numCharactersInPassword , node . $$ ( '#password' ) . value . length ) ; } }
Helper method that validates a that elements in the password list match
 the expected data.
Helper method that validates a that elements in the password list match the expected data .
// The first child is a template, skip and get the real 'first child'.