function testListBoxDialogFocus() {
  return new goog.Promise(function(resolve, reject) {
    // Verify that the container is scrolled.
    var scrollIntoContainerView = mockControl.createMethodMock(goog.style,
        'scrollIntoContainerView');
    var scrollIntoContainerViewDialog = new goog.testing.mockmatchers
        .SaveArgument();
    var scrollIntoContainerViewButton = new goog.testing.mockmatchers
        .SaveArgument();
    scrollIntoContainerView(scrollIntoContainerViewButton,
        scrollIntoContainerViewDialog);
    mockControl.$replayAll();

    // Show the list box.
    firebaseui.auth.ui.element.listBoxDialog.showListBoxDialog.call(component,
        items,
        function(id) {
          // The listbox should report that the second button was clicked.
          assertEquals('2', id);
          resolve();
        },
        // Focus on the second element.
        '2');

    // There should be two buttons shown.
    var dialogButtons = getDialogButtons();
    assertEquals(2, dialogButtons.length);
    assertEquals('Foo', dialogButtons[0].textContent);
    assertEquals('Bar', dialogButtons[1].textContent);

    // The container should be scrolled to the second button.
    assertEquals(firebaseui.auth.ui.element.dialog.getDialogElement(),
        scrollIntoContainerViewDialog.arg);
    assertEquals(dialogButtons[1], scrollIntoContainerViewButton.arg);

    // TODO: Assert that the second button is focused, and press "enter" on the
    // keyboard instead of clicking.
    goog.testing.events.fireClickSequence(dialogButtons[1]);
  });
}
Tests that the pre-selected item is focused and the container is scrolled
such that the item is visible.
@return {!goog.Promise}