#include "components/search/start_suggest_service.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/task_environment.h"
#include "components/omnibox/browser/test_scheme_classifier.h"
#include "components/search/search.h"
#include "components/search/search_provider_observer.h"
#include "components/search_engines/search_engines_test_environment.h"
#include "components/search_engines/template_url_service.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
std::string GoodServerResponse() { … }
std::string GoodServerResponse2() { … }
std::string BadServerResponse() { … }
}
class MockSearchProviderObserver : public SearchProviderObserver { … };
class TestStartSuggestService : public StartSuggestService { … };
class StartSuggestServiceTest : public ::testing::Test { … };
TEST_F(StartSuggestServiceTest,
HandleBasicValidResponseAndClearWhenChangeDefaultSearchEngine) { … }
TEST_F(StartSuggestServiceTest, TestReturnSavedSuggestions) { … }
TEST_F(StartSuggestServiceTest, TestFetchFromServerSet) { … }
TEST_F(StartSuggestServiceTest, TestBadResponseReturnsNothing) { … }