#include "extensions/renderer/bindings/api_response_validator.h"
#include <optional>
#include <vector>
#include "base/auto_reset.h"
#include "base/functional/bind.h"
#include "extensions/renderer/bindings/api_binding_test.h"
#include "extensions/renderer/bindings/api_binding_test_util.h"
#include "extensions/renderer/bindings/api_binding_util.h"
#include "extensions/renderer/bindings/api_invocation_errors.h"
#include "extensions/renderer/bindings/api_signature.h"
#include "extensions/renderer/bindings/api_type_reference_map.h"
#include "extensions/renderer/bindings/argument_spec.h"
#include "extensions/renderer/bindings/argument_spec_builder.h"
#include "extensions/renderer/bindings/returns_async_builder.h"
#include "gin/converter.h"
#include "v8/include/v8.h"
namespace extensions {
namespace {
constexpr char kMethodName[] = …;
std::unique_ptr<APISignature> OneStringCallbackSignature() { … }
v8::LocalVector<v8::Value> StringToV8Vector(v8::Local<v8::Context> context,
const char* args) { … }
}
class APIResponseValidatorTest : public APIBindingTest { … };
TEST_F(APIResponseValidatorTest, TestValidation) { … }
TEST_F(APIResponseValidatorTest, TestDoesNotValidateWithAPIProvidedCallback) { … }
TEST_F(APIResponseValidatorTest, TestDoesNotValidateWhenAPIErrorPresent) { … }
TEST_F(APIResponseValidatorTest, TestDoesNotValidateWithUnknownSignature) { … }
}