chromium/components/safe_search_api/url_checker_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/safe_search_api/url_checker.h"

#include <stddef.h>

#include <algorithm>
#include <iterator>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/ranges/algorithm.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "components/safe_search_api/fake_url_checker_client.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

_;

namespace safe_search_api {

namespace {

constexpr size_t kCacheSize =;

const char* kURLs[] =;

ClientClassification ToAPIClassification(Classification classification,
                                         bool uncertain) {}

auto Recorded(const std::map<CacheAccessStatus, int>& expected) {}

}  // namespace

class SafeSearchURLCheckerTest : public testing::Test {};

TEST_F(SafeSearchURLCheckerTest, Simple) {}

TEST_F(SafeSearchURLCheckerTest, Cache) {}

TEST_F(SafeSearchURLCheckerTest, CoalesceRequestsToSameURL) {}

TEST_F(SafeSearchURLCheckerTest, CacheTimeout) {}

TEST_F(SafeSearchURLCheckerTest, DoNotCacheUncertainClassifications) {}

TEST_F(SafeSearchURLCheckerTest, DestroyURLCheckerBeforeCallback) {}

}  // namespace safe_search_api