function testHandlePasswordSignIn() {
  firebaseui.auth.widget.handler.handlePasswordSignIn(
      app, container, passwordAccount.getEmail());
  assertPasswordSignInPage();
  assertTosPpFooter(tosCallback, 'http://localhost/privacy_policy');
  goog.dom.forms.setValue(getPasswordElement(), '123');
  submitForm();
  testAuth.assertSignInWithEmailAndPassword(
      [passwordAccount.getEmail(), '123'],
      function() {
        testAuth.setUser({
          'email': passwordAccount.getEmail(),
          'displayName': passwordAccount.getDisplayName()
        });
        return {
          'user': testAuth.currentUser,
          'credential': null,
          'operationType': 'signIn',
          'additionalUserInfo': {'providerId': 'password', 'isNewUser': false}
        };
      });
  // Sign out from internal instance and then sign in with passed credential to
  // external instance.
  return testAuth.process().then(function() {
    testAuth.assertSignOut([]);
    return testAuth.process();
  }).then(function() {
    externalAuth.assertUpdateCurrentUser(
        [testAuth.currentUser],
        function() {
          externalAuth.setUser(testAuth.currentUser);
        });
    return externalAuth.process();
  }).then(function() {
    testUtil.assertGoTo('http://localhost/home');
  });
}
@fileoverview Test for password sign in handler.