#include "extensions/renderer/bindings/exception_handler.h"
#include <optional>
#include <string>
#include <tuple>
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
#include "extensions/renderer/bindings/api_binding_test.h"
#include "extensions/renderer/bindings/api_binding_test_util.h"
#include "gin/converter.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace extensions {
namespace {
void PopulateError(std::optional<std::string>* error_out,
v8::Local<v8::Context> context,
const std::string& error) { … }
void ThrowException(v8::Local<v8::Context> context,
const std::string& to_throw,
ExceptionHandler* handler) { … }
}
ExceptionHandlerTest;
TEST_F(ExceptionHandlerTest, TestBasicHandling) { … }
TEST_F(ExceptionHandlerTest, PerContextHandlers) { … }
TEST_F(ExceptionHandlerTest, ThrowingNonErrors) { … }
TEST_F(ExceptionHandlerTest, StackTraces) { … }
}