chromium/chrome/browser/extensions/api/search/search_api_unittest.cc

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

#include "chrome/browser/extensions/api/search/search_api.h"

#include <string_view>

#include "base/memory/scoped_refptr.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sessions/session_tab_helper_factory.h"
#include "chrome/test/base/search_test_utils.h"
#include "chrome/test/base/test_browser_window.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/test/web_contents_tester.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/common/extension_builder.h"

namespace extensions {

namespace {

// Creates an extension with "search" permission.
scoped_refptr<const Extension> CreateSearchExtension() {}

scoped_refptr<SearchQueryFunction> CreateSearchFunction(
    scoped_refptr<const Extension> extension) {}

std::unique_ptr<content::WebContents> CreateWebContents(Browser* browser) {}

}  // namespace

class SearchApiUnitTest : public ExtensionServiceTestBase {};

void SearchApiUnitTest::SetUp() {}

void SearchApiUnitTest::TearDown() {}

void SearchApiUnitTest::RunFunctionAndExpectError(
    const std::string& input,
    const std::string_view expected) {}

// Test for error if search field is empty string.
TEST_F(SearchApiUnitTest, QueryEmpty) {}

// Test for error if both disposition and tabId are populated.
TEST_F(SearchApiUnitTest, DispositionAndTabIDValid) {}

// Test for error if both disposition and tabId are populated.
TEST_F(SearchApiUnitTest, InvalidTabId) {}

// Test for error if missing browser context.
TEST_F(SearchApiUnitTest, NoActiveBrowser) {}

}  // namespace extensions