chromium/components/supervised_user/core/browser/kids_chrome_management_url_checker_client_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/supervised_user/core/browser/kids_chrome_management_url_checker_client.h"

#include <memory>
#include <string>
#include <string_view>

#include "base/functional/bind.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "base/values.h"
#include "base/version_info/channel.h"
#include "components/safe_search_api/url_checker_client.h"
#include "components/signin/public/base/consent_level.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "components/supervised_user/core/browser/proto/kidsmanagement_messages.pb.h"
#include "components/supervised_user/core/common/features.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "net/http/http_status_code.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "services/network/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace supervised_user {
namespace {

ClassifyUrlResponse;
_;

static constexpr std::string_view kKidsApiEndpoint{};

class KidsChromeManagementURLCheckerClientTest
    : public ::testing::TestWithParam<bool> {};

TEST_P(KidsChromeManagementURLCheckerClientTest, UrlAllowed) {}

TEST_P(KidsChromeManagementURLCheckerClientTest, HistogramsAreEmitted) {}

TEST_P(KidsChromeManagementURLCheckerClientTest, UrlRestricted) {}

TEST_P(KidsChromeManagementURLCheckerClientTest, NoPrimaryAccount) {}

TEST_P(KidsChromeManagementURLCheckerClientTest, AccessTokenError) {}

TEST_P(KidsChromeManagementURLCheckerClientTest, NetworkError) {}

TEST_P(KidsChromeManagementURLCheckerClientTest, HttpError) {}

TEST_P(KidsChromeManagementURLCheckerClientTest, ServiceError) {}

TEST_P(KidsChromeManagementURLCheckerClientTest,
       PendingRequestsAreCanceledWhenClientIsDestroyed) {}

INSTANTIATE_TEST_SUITE_P();
}  // namespace
}  // namespace supervised_user