#include "chrome/browser/sharing/sharing_device_registration_impl.h"
#include <stdint.h>
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "components/gcm_driver/instance_id/instance_id_driver.h"
#include "components/prefs/pref_registry.h"
#include "components/prefs/pref_service_factory.h"
#include "components/sharing_message/features.h"
#include "components/sharing_message/pref_names.h"
#include "components/sharing_message/sharing_constants.h"
#include "components/sharing_message/sharing_device_registration_result.h"
#include "components/sharing_message/sharing_sync_preference.h"
#include "components/sharing_message/vapid_key_manager.h"
#include "components/sync/test/test_sync_service.h"
#include "components/sync_device_info/device_info.h"
#include "components/sync_device_info/fake_device_info_sync_service.h"
#include "components/sync_preferences/pref_service_mock_factory.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "crypto/ec_private_key.h"
#include "google_apis/gcm/engine/account_mapping.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
const char kAppID[] = …;
const char kVapidFCMToken[] = …;
const char kVapidFCMToken2[] = …;
const char kSenderIdFCMToken[] = …;
const char kDevicep256dh[] = …;
const char kDevicep256dh2[] = …;
const char kSenderIdP256dh[] = …;
const char kDeviceAuthSecret[] = …;
const char kDeviceAuthSecret2[] = …;
const char kSenderIdAuthSecret[] = …;
class MockInstanceIDDriver : public instance_id::InstanceIDDriver { … };
class FakeInstanceID : public instance_id::InstanceID { … };
class SharingDeviceRegistrationImplTest : public testing::Test { … };
}
TEST_F(SharingDeviceRegistrationImplTest, IsSharedClipboardSupported_True) { … }
TEST_F(SharingDeviceRegistrationImplTest, IsSharedClipboardSupported_False) { … }
TEST_F(SharingDeviceRegistrationImplTest, RegisterDeviceTest_Success) { … }
TEST_F(SharingDeviceRegistrationImplTest, RegisterDeviceTest_Vapid_Only) { … }
TEST_F(SharingDeviceRegistrationImplTest, RegisterDeviceTest_SenderIDOnly) { … }
TEST_F(SharingDeviceRegistrationImplTest, RegisterDeviceTest_InternalError) { … }
TEST_F(SharingDeviceRegistrationImplTest, RegisterDeviceTest_NetworkError) { … }
TEST_F(SharingDeviceRegistrationImplTest, RegisterDeviceTest_FatalError) { … }
TEST_F(SharingDeviceRegistrationImplTest, UnregisterDeviceTest_Success) { … }
TEST_F(SharingDeviceRegistrationImplTest, UnregisterDeviceTest_SenderIDonly) { … }