#include "components/sharing_message/sharing_fcm_handler.h"
#include <memory>
#include "base/test/task_environment.h"
#include "components/gcm_driver/fake_gcm_driver.h"
#include "components/sharing_message/fake_device_info.h"
#include "components/sharing_message/fake_sharing_handler_registry.h"
#include "components/sharing_message/features.h"
#include "components/sharing_message/mock_sharing_message_handler.h"
#include "components/sharing_message/proto/sharing_message.pb.h"
#include "components/sharing_message/sharing_constants.h"
#include "components/sharing_message/sharing_fcm_handler.h"
#include "components/sharing_message/sharing_fcm_sender.h"
#include "components/sharing_message/sharing_handler_registry.h"
#include "components/sync/protocol/device_info_specifics.pb.h"
#include "components/sync_device_info/device_info.h"
#include "components/sync_device_info/fake_device_info_sync_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Eq;
SharingMessage;
namespace {
const char kTestAppId[] = …;
const char kTestMessageId[] = …;
const char kTestMessageIdSecondaryUser[] = …;
const char kOriginalMessageId[] = …;
const char kSenderGuid[] = …;
const char kSenderName[] = …;
const char kVapidFCMToken[] = …;
const char kVapidP256dh[] = …;
const char kVapidAuthSecret[] = …;
const char kSenderIdFCMToken[] = …;
const char kSenderIdP256dh[] = …;
const char kSenderIdAuthSecret[] = …;
const char kServerConfiguration[] = …;
const char kServerP256dh[] = …;
const char kServerAuthSecret[] = …;
void SetupFcmChannel(
components_sharing_message::FCMChannelConfiguration* fcm_configuration) { … }
class MockSharingFCMSender : public SharingFCMSender { … };
class SharingFCMHandlerTest : public testing::Test { … };
}
MATCHER_P(ProtoEquals, message, "") { … }
MATCHER(FCMChannelMatcher, "") { … }
MATCHER(ServerChannelMatcher, "") { … }
TEST_F(SharingFCMHandlerTest, AckMessageHandler) { … }
TEST_F(SharingFCMHandlerTest, PingMessageHandler) { … }
TEST_F(SharingFCMHandlerTest, PingMessageHandlerWithMessageIdInPayload) { … }
TEST_F(SharingFCMHandlerTest, PingMessageHandlerWithResponse) { … }
TEST_F(SharingFCMHandlerTest, PingMessageHandlerSecondaryUser) { … }
TEST_F(SharingFCMHandlerTest,
PingMessageHandlerWithServerChannelConfiguration) { … }