#include <memory>
#include "base/dcheck_is_on.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/test/base/testing_browser_process.h"
#include "extensions/browser/extension_function.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
namespace {
void SuccessCallback(bool* did_respond,
ExtensionFunction::ResponseType type,
base::Value::List results,
const std::string& error,
mojom::ExtraResponseDataPtr) { … }
void FailCallback(bool* did_respond,
ExtensionFunction::ResponseType type,
base::Value::List results,
const std::string& error,
mojom::ExtraResponseDataPtr) { … }
class ValidationFunction : public ExtensionFunction { … };
}
ChromeExtensionFunctionUnitTest;
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_SimpleFunctionTest …
#else
#define MAYBE_SimpleFunctionTest …
#endif
TEST_F(ChromeExtensionFunctionUnitTest, MAYBE_SimpleFunctionTest) { … }
TEST_F(ChromeExtensionFunctionUnitTest, BrowserShutdownValidationFunctionTest) { … }
TEST_F(ChromeExtensionFunctionUnitTest, DestructionWithoutResponseOnUnload) { … }
#if DCHECK_IS_ON()
ChromeExtensionFunctionDeathTest;
#if BUILDFLAG(IS_WIN)
#define MAYBE_DestructionWithoutResponse …
#else
#define MAYBE_DestructionWithoutResponse …
#endif
TEST_F(ChromeExtensionFunctionDeathTest, MAYBE_DestructionWithoutResponse) { … }
#endif
}