@@ -436,23 +436,6 @@ TEST_F(UserDesktopTest, TestReload) {
436436 VerifyProviderData (firebase_user_);
437437}
438438
439- // Tests the happy case of setting a new email on the currently logged in user.
440- TEST_F (UserDesktopTest, TestUpdateEmail) {
441- InitializeConfigWithAFake (GetUrlForApi (API_KEY, " setAccountInfo" ),
442- FakeSetAccountInfoResponse ());
443-
444- // SetAccountInfoResponse contains a new token.
445- id_token_listener.ExpectChanges (1 );
446- auth_state_listener.ExpectChanges (0 );
447-
448- const std::string new_email =
" [email protected] " ;
449-
450- EXPECT_NE (new_email, firebase_user_.email ());
451- WaitForFuture (firebase_user_.UpdateEmail (new_email.c_str ()));
452- EXPECT_EQ (new_email, firebase_user_.email ());
453- VerifyProviderData (firebase_user_);
454- }
455-
456439// Tests the happy case of setting a new password on the currently logged in
457440// user.
458441TEST_F (UserDesktopTest, TestUpdatePassword) {
@@ -815,16 +798,6 @@ TEST_F(UserDesktopTestSignOutOnError, Reload) {
815798 sem_.Wait ();
816799}
817800
818- TEST_F (UserDesktopTestSignOutOnError, UpdateEmail) {
819- CheckSignOutIfUserIsInvalid (
820- GetUrlForApi (API_KEY, " setAccountInfo" ), " USER_NOT_FOUND" ,
821- kAuthErrorUserNotFound , [&] {
822- sem_.Post ();
823- return firebase_user_.
UpdateEmail (
" [email protected] " );
824- });
825- sem_.Wait ();
826- }
827-
828801TEST_F (UserDesktopTestSignOutOnError, UpdatePassword) {
829802 CheckSignOutIfUserIsInvalid (
830803 GetUrlForApi (API_KEY, " setAccountInfo" ), " USER_DISABLED" ,
@@ -881,30 +854,6 @@ TEST_F(UserDesktopTestSignOutOnError, GetToken) {
881854 sem_.Wait ();
882855}
883856
884- // This test is to expose potential race condition and is primarily intended to
885- // be run with --config=tsan
886- TEST_F (UserDesktopTest, TestRaceCondition_SetAccountInfoAndSignOut) {
887- InitializeConfigWithAFake (GetUrlForApi (API_KEY, " setAccountInfo" ),
888- FakeSetAccountInfoResponse ());
889-
890- // SignOut is engaged on the main thread, whereas UpdateEmail will be executed
891- // on the background thread; consequently, the order in which they are
892- // executed is not defined. Nevertheless, this should not lead to any data
893- // corruption, when UpdateEmail writes to user profile while it's being
894- // deleted by SignOut. Whichever method succeeds first, user must be signed
895- // out once both are finished: if SignOut finishes last, it overrides the
896- // updated user, and if UpdateEmail finishes last, it should note that there
897- // is no currently signed in user and fail with kAuthErrorUserNotFound.
898-
899- auto future = firebase_user_.UpdateEmail (" some_email" );
900- firebase_auth_->SignOut ();
901- while (future.status () == firebase::kFutureStatusPending ) {
902- }
903-
904- EXPECT_THAT (future.error (), AnyOf (kAuthErrorNone , kAuthErrorNoSignedInUser ));
905- EXPECT_FALSE (firebase_auth_->current_user ().is_valid ());
906- }
907-
908857// LinkWithProvider tests.
909858TEST_F (UserDesktopTest, TestLinkWithProviderReturnsUnsupportedError) {
910859 FederatedOAuthProvider provider;
0 commit comments