#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
#include <memory>
#include "base/json/json_reader.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/scoped_feature_list.h"
#include "components/invalidation/impl/fake_invalidation_handler.h"
#include "components/invalidation/public/invalidation.h"
#include "components/invalidation/public/invalidation_util.h"
#include "components/invalidation/public/invalidator_state.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gtest/include/gtest/gtest.h"
IsEmpty;
Pair;
UnorderedElementsAre;
namespace invalidation {
namespace {
template <class... Inv>
void Dispatch(InvalidatorRegistrarWithMemory& registrar, Inv... inv) { … }
template <class... Topic>
void DispatchSuccessfullySubscribed(InvalidatorRegistrarWithMemory& registrar,
Topic... topics) { … }
template <class... Inv>
std::map<Topic, Invalidation> ExpectedInvalidations(Inv... inv) { … }
constexpr char kTopicsToHandler[] = …;
class InvalidatorRegistrarWithMemoryTest : public testing::Test { … };
TEST_F(InvalidatorRegistrarWithMemoryTest, Basic) { … }
TEST_F(InvalidatorRegistrarWithMemoryTest, MultipleHandlers) { … }
TEST_F(InvalidatorRegistrarWithMemoryTest, MultipleRegistrations) { … }
TEST_F(InvalidatorRegistrarWithMemoryTest, EmptySetUnregisters) { … }
TEST_F(InvalidatorRegistrarWithMemoryTest, RestoresInterestingTopics) { … }
TEST_F(InvalidatorRegistrarWithMemoryTest,
ShouldKeepSubscriptionsAfterRestart) { … }
}
}