chromium/components/search_engines/template_url_service_test_util.h

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

#ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_
#define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_

#include "base/scoped_observation.h"
#include "base/test/task_environment.h"
#include "components/prefs/testing_pref_service.h"
#include "components/search_engines/template_url_service.h"
#include "components/search_engines/template_url_service_observer.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"

class WebDatabaseService;
class KeywordWebDataService;

namespace search_engines {
class SearchEngineChoiceService;
}

namespace base {
class RunLoop;
}

void RegisterPrefsForTemplateURLService(
    user_prefs::PrefRegistrySyncable* registry);

// One-shot observer that blocks until `template_url_service` is done loading.
class TemplateURLServiceLoadWaiter : public TemplateURLServiceObserver {};

class TemplateURLServiceUnitTestBase : public testing::Test {};

class LoadedTemplateURLServiceUnitTestBase
    : public TemplateURLServiceUnitTestBase {};

#endif  // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_