function checkStructureForProgressivePicker(palette, emoji) {
  // We can hackily check the items by selecting an item and then getting the
  // selected item.
  for (let i = 0; i < emoji[1].length; i++) {
    palette.setSelectedIndex(i);
    const emojiInfo = emoji[1][i];
    const cell = palette.getSelectedItem();
    const inner = /** @type {Element} */ (cell.firstChild);

    // Check that the cell is a div wrapped around something else, and that the
    // outer div contains the goomoji attribute
    assertEquals(
        'The palette item should be a div wrapped around something',
        cell.tagName, 'DIV');
    assertNotNull('The outer div is not wrapped around another element', inner);
    assertEquals(
        'The palette item should have the goomoji attribute',
        cell.getAttribute(Emoji.ATTRIBUTE), emojiInfo[1]);
    assertEquals(
        'The palette item should have the data-goomoji attribute',
        cell.getAttribute(Emoji.DATA_ATTRIBUTE), emojiInfo[1]);

    // Now check the contents of the cells
    const spriteInfo = emojiInfo[2];
    if (spriteInfo) {
      const cssClass = spriteInfo.getCssClass();
      if (cssClass) {
        assertEquals('DIV', inner.tagName);
        assertTrue(
            'Sprite should have its CSS class set',
            classlist.contains(inner, cssClass));
      } else {
        // There's an inner div wrapping an img tag
        assertEquals('DIV', inner.tagName);
        const img = inner.firstChild;
        assertNotNull('Div should be wrapping something', img);
        assertEquals('IMG', img.tagName);
        checkPathsEndWithSameFile(img.src, spriteInfo.getUrl());
        assertEquals(
            spriteInfo.getWidthCssValue(), style.getStyle(inner, 'width'));
        assertEquals(
            spriteInfo.getHeightCssValue(), style.getStyle(inner, 'height'));
        assertEquals(
            spriteInfo.getXOffsetCssValue().replace(/px/, '').replace(/pt/, ''),
            style.getStyle(img, 'left').replace(/px/, '').replace(/pt/, ''));
        assertEquals(
            spriteInfo.getYOffsetCssValue().replace(/px/, '').replace(/pt/, ''),
            style.getStyle(img, 'top').replace(/px/, '').replace(/pt/, ''));
      }
    } else {
      // A non-sprited emoji is just an img
      assertEquals(inner.tagName, 'IMG');
      checkPathsEndWithSameFile(inner.src, emojiInfo[0]);
    }
  }
}
Checks and verifies the structure of a progressively-rendered emojipicker.
@param {!EmojiPalette} palette Emoji palette to check.
@param {Array<Array<string>>} emoji Emoji that should be in the palette.
@suppress {strictMissingProperties,checkTypes} suppression added to enable
type checking