#include "components/lookalikes/core/lookalike_url_util.h"
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "components/lookalikes/core/safety_tip_test_utils.h"
#include "components/lookalikes/core/safety_tips_config.h"
#include "components/url_formatter/spoof_checks/common_words/common_words_util.h"
#include "components/url_formatter/spoof_checks/top_domains/test_top_bucket_domains.h"
#include "components/version_info/channel.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace test {
#include "components/url_formatter/spoof_checks/common_words/common_words_test-inc.cc"
#include "components/url_formatter/spoof_checks/top_domains/test_domains-trie-inc.cc"
}
ComboSquattingParams;
ComboSquattingType;
DomainInfo;
GetDomainInfo;
IsHeuristicEnabledForHostname;
LookalikeUrlMatchType;
TargetEmbeddingType;
Channel;
namespace {
constexpr std::pair<const char*, const char*> kBrandNames[] = …;
const char* const kPopularKeywords[] = …;
const ComboSquattingParams kComboSquattingParams{ … };
}
std::string TargetEmbeddingTypeToString(TargetEmbeddingType type) { … }
class LookalikeUrlUtilTest : public testing::Test { … };
TEST_F(LookalikeUrlUtilTest, IsEditDistanceAtMostOne) { … }
TEST_F(LookalikeUrlUtilTest, EditDistanceExcludesCommonFalsePositives) { … }
TEST_F(LookalikeUrlUtilTest, CharacterSwapExcludesCommonFalsePositives) { … }
bool IsGoogleScholar(const std::string& hostname) { … }
struct TargetEmbeddingHeuristicTestCase { … };
TEST_F(LookalikeUrlUtilTest, ShouldBlockBySpoofCheckResult) { … }
TEST_F(LookalikeUrlUtilTest, TargetEmbeddingTest) { … }
TEST_F(LookalikeUrlUtilTest, TargetEmbeddingIgnoresComponentWordlist) { … }
TEST_F(LookalikeUrlUtilTest, GetETLDPlusOneHandlesSpecialRegistries) { … }
TEST_F(LookalikeUrlUtilTest, HasOneCharacterSwap) { … }
TEST_F(LookalikeUrlUtilTest, GetSuggestedURL) { … }
TEST_F(LookalikeUrlUtilTest, IsHeuristicEnabledForHostname) { … }
class ComboSquattingTest : public testing::Test { … };
TEST_F(ComboSquattingTest, IsComboSquatting) { … }