#include "components/content_settings/core/common/host_indexed_content_settings.h"
#include <functional>
#include <string>
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/content_settings/core/common/content_settings_rules.h"
#include "components/content_settings/core/common/content_settings_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace content_settings {
namespace {
ContentSettingPatternSource CreateSetting(
const std::string& primary_pattern,
const std::string& secondary_pattern,
ContentSetting setting,
base::Time expiration = base::Time(),
ProviderType source = ProviderType::kNone) { … }
ContentSettingsForOneType ToVector(const HostIndexedContentSettings& index) { … }
HostIndexedContentSettings FromVector(
const ContentSettingsForOneType& settings) { … }
class HostIndexedContentSettingsTest : public testing::Test { … };
TEST_F(HostIndexedContentSettingsTest, EmptyHostIndexedContentSettings) { … }
TEST_F(HostIndexedContentSettingsTest, Sorting) { … }
TEST_F(HostIndexedContentSettingsTest, DomainWildcardMatchFound) { … }
TEST_F(HostIndexedContentSettingsTest, MostSpecificMatchBlocks) { … }
TEST_F(HostIndexedContentSettingsTest, SetDelete) { … }
TEST_F(HostIndexedContentSettingsTest, ExactDomainMatchFound) { … }
TEST_F(HostIndexedContentSettingsTest, NotFirstDomainMatchFound) { … }
TEST_F(HostIndexedContentSettingsTest, WildcardMatchFound) { … }
TEST_F(HostIndexedContentSettingsTest, NoMatchFound) { … }
TEST_F(HostIndexedContentSettingsTest, CheckIPAddressesMatch) { … }
TEST_F(HostIndexedContentSettingsTest, CheckIPAddressesMatchIsBlock) { … }
TEST_F(HostIndexedContentSettingsTest, CheckIPAddressesNoMatch) { … }
class FindContentSettingTest : public testing::Test { … };
TEST_F(FindContentSettingTest, VectorOfIndices) { … }
}
}