chromium/extensions/browser/api_unittest.h

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

#ifndef EXTENSIONS_BROWSER_API_UNITTEST_H_
#define EXTENSIONS_BROWSER_API_UNITTEST_H_

#include <memory>
#include <optional>
#include <string>

#include "base/memory/scoped_refptr.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/extensions_test.h"

namespace base {
class Value;
}

namespace content {
class WebContents;
}

class ExtensionFunction;

namespace extensions {

// Use this class to enable calling API functions in a unittest.
// By default, this class will create and load an empty unpacked |extension_|,
// which will be used in all API function calls. This extension can be
// overridden using set_extension().
// When calling RunFunction[AndReturn*], |args| should be in JSON format,
// wrapped in a list. See also RunFunction* in api_test_utils.h.
class ApiUnitTest : public ExtensionsTest {};

}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_API_UNITTEST_H_