chromium/chrome/browser/search_engines/template_url_fetcher_unittest.cc

// Copyright 2012 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 <stddef.h>

#include <memory>
#include <string>
#include <utility>

#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/search_engines/template_url_service_test_util.h"
#include "chrome/test/base/testing_profile.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_fetcher.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/url_loader_interceptor.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace {

constexpr int32_t kRequestID =;

bool GetTestFilePath(const std::string& file_name, base::FilePath* path) {}

class TestTemplateUrlFetcher : public TemplateURLFetcher {};

// Basic set-up for TemplateURLFetcher tests.
class TemplateURLFetcherTest : public testing::Test {};

TemplateURLFetcherTest::TemplateURLFetcherTest()
    :{}

void TemplateURLFetcherTest::RequestCompletedCallback() {}

void TemplateURLFetcherTest::StartDownload(const std::u16string& keyword,
                                           const std::string& osdd_file_name,
                                           bool check_that_file_exists) {}

void TemplateURLFetcherTest::WaitForDownloadToFinish() {}

TEST_F(TemplateURLFetcherTest, BasicAutodetectedTest) {}

// This test is similar to the BasicAutodetectedTest except the xml file
// provided doesn't include a short name for the search engine.  We should
// fall back to the hostname.
TEST_F(TemplateURLFetcherTest, InvalidShortName) {}

TEST_F(TemplateURLFetcherTest, DuplicatesThrownAway) {}

TEST_F(TemplateURLFetcherTest, AutodetectedBeforeLoadTest) {}

TEST_F(TemplateURLFetcherTest, DuplicateKeywordsTest) {}

TEST_F(TemplateURLFetcherTest, DuplicateDownloadTest) {}

TEST_F(TemplateURLFetcherTest, UnicodeTest) {}

}  // namespace