#include "extensions/renderer/bindings/api_signature.h"
#include <string_view>
#include "base/values.h"
#include "extensions/renderer/bindings/api_binding_test.h"
#include "extensions/renderer/bindings/api_binding_test_util.h"
#include "extensions/renderer/bindings/api_invocation_errors.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/binding_access_checker.h"
#include "extensions/renderer/bindings/returns_async_builder.h"
#include "gin/converter.h"
#include "gin/dictionary.h"
namespace extensions {
ArgumentError;
InvalidType;
kTypeBoolean;
kTypeInteger;
kTypeString;
NoMatchingSignature;
namespace {
SpecVector;
ReturnsAsync;
std::unique_ptr<APISignature> OneString() { … }
SpecVector StringAndIntSpec() { … }
std::unique_ptr<APISignature> StringAndInt() { … }
SpecVector StringOptionalIntAndBoolSpec() { … }
std::unique_ptr<APISignature> StringOptionalIntAndBool() { … }
SpecVector StringAndOptionalIntSpec() { … }
std::unique_ptr<APISignature> OneObject() { … }
std::unique_ptr<APISignature> NoArgs() { … }
std::unique_ptr<APISignature> IntAndCallback() { … }
std::unique_ptr<APISignature> IntAndOptionalCallback() { … }
std::unique_ptr<APISignature> OptionalIntAndCallback() { … }
std::unique_ptr<APISignature> OptionalCallback() { … }
std::unique_ptr<APISignature> IntAnyOptionalObjectOptionalCallback() { … }
std::unique_ptr<APISignature> RefObj() { … }
std::unique_ptr<APISignature> RefEnum() { … }
std::unique_ptr<APISignature> OptionalObjectAndOptionalCallback() { … }
std::unique_ptr<APISignature> OptionalIntAndNumber() { … }
std::unique_ptr<APISignature> OptionalIntAndInt() { … }
v8::LocalVector<v8::Value> StringToV8Vector(v8::Local<v8::Context> context,
const char* args) { … }
}
class APISignatureTest : public APIBindingTest { … };
TEST_F(APISignatureTest, BasicSignatureParsing) { … }
TEST_F(APISignatureTest, TypeRefsTest) { … }
TEST_F(APISignatureTest, ExpectedSignature) { … }
TEST_F(APISignatureTest, ParseIgnoringSchema) { … }
TEST_F(APISignatureTest, ParseIgnoringSchemaWithPromises) { … }
TEST_F(APISignatureTest, ParseArgumentsToV8) { … }
TEST_F(APISignatureTest, ParseArgumentsToV8WithUnspecifiedOptionalCallback) { … }
TEST_F(APISignatureTest, ValidateResponse) { … }
TEST_F(APISignatureTest, PromisesSupport) { … }
}