function assertSuccessfulPasswordLinking(credential) {
  testAuth.assertSignInWithEmailAndPassword(
      [passwordAccount.getEmail(), '123'], function() {
        testAuth.setUser({
          'email': passwordAccount.getEmail(),
          'displayName': passwordAccount.getDisplayName()
        });
        var expectedUserCredential = {
          'user': testAuth.currentUser,
          'credential': credential,
          'operationType': 'link',
          'additionalUserInfo': {
            'providerId': 'facebook.com',
            'isNewUser': false
          }
        };
        testAuth.currentUser.assertLinkWithCredential(
            [credential], expectedUserCredential);
        return {
          'user': testAuth.currentUser,
          'credential': null,
          'operationType': 'signIn',
          'additionalUserInfo': {'providerId': 'password', 'isNewUser': false}
        };
      });
}
Asserts a successful password linking flow, with the given credential.
@param {!Object} credential The pending credential to link to the user.