#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/omnibox/browser/keyword_provider.h"
#include <stddef.h>
#include <map>
#include <memory>
#include <utility>
#include "base/command_line.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/task_environment.h"
#include "components/omnibox/browser/autocomplete_match.h"
#include "components/omnibox/browser/autocomplete_scheme_classifier.h"
#include "components/omnibox/browser/mock_autocomplete_provider_client.h"
#include "components/search_engines/search_engines_switches.h"
#include "components/search_engines/search_engines_test_environment.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/metrics_proto/omnibox_event.pb.h"
#include "third_party/metrics_proto/omnibox_focus_type.pb.h"
#include "url/gurl.h"
#include "url/url_constants.h"
ASCIIToUTF16;
namespace {
class TestingSchemeClassifier : public AutocompleteSchemeClassifier { … };
const TemplateURLService::Initializer kTestData[] = …;
}
class KeywordProviderTest : public testing::Test { … };
void KeywordProviderTest::SetUp() { … }
template<class ResultType>
void KeywordProviderTest::RunTest(TestData<ResultType>* keyword_cases,
int num_cases,
ResultType AutocompleteMatch::* member) { … }
TEST_F(KeywordProviderTest, Edit) { … }
TEST_F(KeywordProviderTest, URL) { … }
TEST_F(KeywordProviderTest, Contents) { … }
TEST_F(KeywordProviderTest, AddKeyword) { … }
TEST_F(KeywordProviderTest, RemoveKeyword) { … }
TEST_F(KeywordProviderTest, GetKeywordForInput) { … }
TEST_F(KeywordProviderTest, GetSubstitutingTemplateURLForInput) { … }
TEST_F(KeywordProviderTest, ExtraQueryParams) { … }
TEST_F(KeywordProviderTest, DoesNotProvideMatchesOnFocus) { … }