#include "components/url_matcher/url_util.h"
#include <memory>
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/url_features.h"
namespace url_matcher {
namespace util {
namespace {
GURL GetEmbeddedURL(const std::string& url) { … }
struct FilterTestParams { … };
void PrintTo(const FilterTestParams& params, std::ostream* os) { … }
bool MatchFilters(const std::vector<std::string>& patterns,
const std::string& url) { … }
class FilterToComponentsTest : public testing::TestWithParam<FilterTestParams> { … };
class OnlyWildcardTest
: public testing::TestWithParam<std::tuple<std::string ,
std::string ,
std::string ,
std::string ,
std::string >> { … };
}
TEST(URLUtilTest, Normalize) { … }
TEST(URLUtilTest, GetEmbeddedURLAmpCache) { … }
TEST(URLUtilTest, GetEmbeddedURLGoogleAmpViewer) { … }
TEST(URLUtilTest, GetEmbeddedURLGoogleWebCache) { … }
TEST(URLUtilTest, GetEmbeddedURLTranslate) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(OnlyWildcardTest, OnlyWildcard) { … }
class URLUtilParamTest : public ::testing::TestWithParam<bool> { … };
TEST_P(URLUtilParamTest, SingleFilter) { … }
TEST(URLUtilTest, MultipleFilters) { … }
TEST_P(URLUtilParamTest, BasicCoverage) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(FilterToComponentsTest, FilterToComponents) { … }
}
}