#include "extensions/renderer/bindings/api_response_validator.h"
#include <ostream>
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"
#include "extensions/renderer/bindings/api_binding_util.h"
#include "extensions/renderer/bindings/api_signature.h"
#include "extensions/renderer/bindings/api_type_reference_map.h"
namespace extensions {
namespace {
APIResponseValidator::TestHandler* g_handler_for_testing = …;
}
APIResponseValidator::TestHandler::TestHandler(HandlerMethod method)
: … { … }
APIResponseValidator::TestHandler::~TestHandler() { … }
void APIResponseValidator::TestHandler::IgnoreSignature(std::string signature) { … }
void APIResponseValidator::TestHandler::HandleFailure(
const std::string& signature_name,
const std::string& error) { … }
bool APIResponseValidator::TestHandler::ShouldIgnoreSignature(
const std::string& signature_name) const { … }
APIResponseValidator::APIResponseValidator(const APITypeReferenceMap* type_refs)
: … { … }
APIResponseValidator::~APIResponseValidator() = default;
void APIResponseValidator::ValidateResponse(
v8::Local<v8::Context> context,
const std::string& method_name,
const v8::LocalVector<v8::Value>& response_arguments,
const std::string& api_error,
CallbackType callback_type) { … }
void APIResponseValidator::ValidateEvent(
v8::Local<v8::Context> context,
const std::string& event_name,
const v8::LocalVector<v8::Value>& event_args) { … }
}