#include "components/supervised_user/core/browser/supervised_user_url_filter.h"
#include <cstddef>
#include <map>
#include <memory>
#include <optional>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "components/prefs/testing_pref_service.h"
#include "components/safe_search_api/fake_url_checker_client.h"
#include "components/supervised_user/core/browser/supervised_user_preferences.h"
#include "components/supervised_user/core/browser/supervised_user_utils.h"
#include "components/supervised_user/test_support/supervised_user_url_filter_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace supervised_user {
class SupervisedUserURLFilterTest : public ::testing::Test,
public SupervisedUserURLFilter::Observer { … };
TEST_F(SupervisedUserURLFilterTest, Basic) { … }
TEST_F(SupervisedUserURLFilterTest, EffectiveURL) { … }
TEST_F(SupervisedUserURLFilterTest, Inactive) { … }
TEST_F(SupervisedUserURLFilterTest, IPAddress) { … }
TEST_F(SupervisedUserURLFilterTest, Canonicalization) { … }
TEST_F(SupervisedUserURLFilterTest, UrlWithNonStandardUrlSchemeAllowed) { … }
TEST_F(SupervisedUserURLFilterTest, HostMatchesPattern) { … }
TEST_F(SupervisedUserURLFilterTest, PatternsWithoutConflicts) { … }
TEST_F(SupervisedUserURLFilterTest, PatternsWithConflicts) { … }
TEST_F(SupervisedUserURLFilterTest, Reason) { … }
TEST_F(SupervisedUserURLFilterTest, UrlsNotRequiringGuardianApprovalAllowed) { … }
TEST_F(SupervisedUserURLFilterTest, PlayTermsAlwaysAllowed) { … }
class SupervisedUserURLFilteringWithConflictsTest
: public testing::TestWithParam<std::tuple<
std::map<std::string, bool>,
std::optional<
SupervisedUserURLFilter::FilteringSubdomainConflictType>>> { … };
TEST_P(SupervisedUserURLFilteringWithConflictsTest,
PatternsWithSubdomainConflicts) { … }
TEST_F(SupervisedUserURLFilteringWithConflictsTest,
PatterWithoutConflictOnEarlyExit) { … }
INSTANTIATE_TEST_SUITE_P(…);
}