chromium/chrome/browser/search_engines/template_url_parser_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.

#include "components/search_engines/template_url_parser.h"

#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/task_environment.h"
#include "chrome/common/chrome_paths.h"
#include "components/search_engines/search_terms_data.h"
#include "components/search_engines/template_url.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "testing/gtest/include/gtest/gtest.h"

ASCIIToUTF16;

// Filters any param which as an occurrence of |name_str| in its |key| or an
// occurrence of |value_str| in its |value|.
bool TestFilter(const std::string& name_str,
                const std::string& value_str,
                const std::string& key,
                const std::string& value) {}

class TemplateURLParserTest : public testing::Test {};

TemplateURLParserTest::TemplateURLParserTest() {}

TemplateURLParserTest::~TemplateURLParserTest() {}

void TemplateURLParserTest::SetUp() {}

void TemplateURLParserTest::ParseFile(
    const std::string& file_name,
    const TemplateURLParser::ParameterFilter& filter) {}

void TemplateURLParserTest::ParseString(
    const std::string& data,
    const TemplateURLParser::ParameterFilter& filter) {}

// Actual tests ---------------------------------------------------------------

TEST_F(TemplateURLParserTest, FailOnBogusURL) {}

TEST_F(TemplateURLParserTest, PassOnHTTPS) {}

TEST_F(TemplateURLParserTest, FailOnPost) {}

TEST_F(TemplateURLParserTest, TestDictionary) {}

TEST_F(TemplateURLParserTest, TestMSDN) {}

TEST_F(TemplateURLParserTest, TestWikipedia) {}

TEST_F(TemplateURLParserTest, NoCrashOnEmptyAttributes) {}

TEST_F(TemplateURLParserTest, TestFirefoxEbay) {}

TEST_F(TemplateURLParserTest, TestFirefoxWebster) {}

TEST_F(TemplateURLParserTest, TestFirefoxYahoo) {}

// Make sure we ignore POST suggestions (this is the same XML file as
// firefox_yahoo.xml, the suggestion method was just changed to POST).
TEST_F(TemplateURLParserTest, TestPostSuggestion) {}

// <Alias> tags are parsed and used as keyword for the template URL.
TEST_F(TemplateURLParserTest, TestKeyword) {}

// Empty <Alias> tags are ignored and the default keyword is used instead
// (because empty keywords are not allowed).
TEST_F(TemplateURLParserTest, TestEmptyKeyword) {}

// An invalid template URL should not crash the parser.
// crbug.com/770734
TEST_F(TemplateURLParserTest, InvalidInput) {}