Skip to content

Commit 2c5d067

Browse files
committed
Fix feedback
1 parent 019e41f commit 2c5d067

4 files changed

Lines changed: 5 additions & 17 deletions

File tree

messaging/integration_test/src/integration_test.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,6 @@ TEST_F(FirebaseMessagingTest, TestRegisterAndUnregister) {
564564

565565
// Note that these methods should only work if the newer registration
566566
// method is enabled. Otherwise, it returns an error.
567-
int expected_error =
568-
is_new_registration_id_ ? 0 : firebase::messaging::kErrorUnknown;
569-
570567
if (is_new_registration_id_) {
571568
firebase::Future<void> reg_future = firebase::messaging::Register();
572569
EXPECT_TRUE(WaitForCompletion(reg_future, "Register"));

messaging/src/common.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <assert.h>
1818

1919
#include <queue>
20+
#include <string>
2021

2122
#include "app/src/cleanup_notifier.h"
2223
#include "app/src/include/firebase/internal/common.h"

messaging/src/include/firebase/messaging.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,22 +730,22 @@ class PollableListener : public Listener {
730730

731731
/// @brief An implementation of `OnMessage` which adds incoming messages
732732
/// to a queue, which can be consumed by calling `PollMessage`.
733-
virtual void OnMessage(const Message& message) override;
733+
void OnMessage(const Message& message) override;
734734

735735
/// @brief An implementation of `OnTokenReceived` which stores the incoming
736736
/// token so that it can be consumed by calling `PollRegistrationToken`.
737737
/// @deprecated Use OnRegistrationReceived(const char*) instead.
738-
FIREBASE_DEPRECATED virtual void OnTokenReceived(const char* token) override;
738+
FIREBASE_DEPRECATED void OnTokenReceived(const char* token) override;
739739

740740
/// @brief An implementation of `OnRegistrationReceived` which stores the
741741
/// incoming installation ID so that it can be consumed by calling
742742
/// `PollRegistration`.
743-
virtual void OnRegistrationReceived(const char* installationId) override;
743+
void OnRegistrationReceived(const char* installationId) override;
744744

745745
/// @brief An implementation of `OnUnregistrationReceived` which stores the
746746
/// incoming installation ID so that it can be consumed by calling
747747
/// `PollUnregistration`.
748-
virtual void OnUnregistrationReceived(const char* installationId) override;
748+
void OnUnregistrationReceived(const char* installationId) override;
749749

750750
/// @brief Returns the first message queued up, if any.
751751
///

messaging/tests/messaging_test.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -476,16 +476,6 @@ TEST_F(MessagingTest, TestTwoRegistrationsReceivedAfterInitialize) {
476476
EXPECT_EQ(listener_.GetOnRegistrationReceivedCount(), 2);
477477
}
478478

479-
TEST_F(MessagingTest, TestUnregistrationClearsCachedRegistration) {
480-
Terminate();
481-
OnRegistrationReceived("my_installation_id");
482-
OnUnregistrationReceived("my_installation_id");
483-
EXPECT_EQ(Initialize(*firebase_app_, &listener_), kInitResultSuccess);
484-
SleepMessagingTest(1);
485-
EXPECT_THAT(listener_.GetRegistrationId(), StrEq(""));
486-
EXPECT_THAT(listener_.GetUnregistrationId(), StrEq("my_installation_id"));
487-
}
488-
489479
#endif // defined(FIREBASE_ANDROID_FOR_DESKTOP)
490480

491481
} // namespace messaging

0 commit comments

Comments
 (0)