#include "components/invalidation/invalidation_factory.h"
#include <variant>
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/gcm_driver/fake_gcm_driver.h"
#include "components/gcm_driver/instance_id/instance_id.h"
#include "components/gcm_driver/instance_id/instance_id_driver.h"
#include "components/invalidation/impl/invalidation_prefs.h"
#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
#include "components/invalidation/impl/per_user_topic_subscription_manager.h"
#include "components/invalidation/impl/profile_identity_provider.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace invalidation {
namespace {
constexpr char kDriveFcmSenderId[] = …;
constexpr char kFakeSenderId[] = …;
constexpr char kFakeProjectId[] = …;
constexpr char kLogPrefix[] = …;
class MockInstanceIDDriver : public instance_id::InstanceIDDriver { … };
class MockInstanceID : public instance_id::InstanceID { … };
class InvalidationFactoryTestBase : public testing::Test { … };
class InvalidationFactoryWithDirectMessagesDisabledTest
: public InvalidationFactoryTestBase { … };
TEST_F(InvalidationFactoryWithDirectMessagesDisabledTest,
CreatesInvalidationService) { … }
TEST_F(InvalidationFactoryWithDirectMessagesDisabledTest,
CreatesInvalidationServiceForDrive) { … }
class InvalidationFactoryWithDirectMessagesEnabledTest
: public InvalidationFactoryTestBase { … };
TEST_F(InvalidationFactoryWithDirectMessagesEnabledTest,
CreatesInvalidationListener) { … }
TEST_F(InvalidationFactoryWithDirectMessagesEnabledTest,
CreatesInvalidationServiceForDrive) { … }
}
}