#include "third_party/blink/renderer/modules/credentialmanagement/public_key_credential.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_arraybuffer_arraybufferview_string.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_client_inputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_client_inputs_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_inputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_inputs_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_values.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_values_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authenticator_selection_criteria.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_creation_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_creation_options_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_descriptor.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_descriptor_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_parameters.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_request_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_request_options_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_rp_entity.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_user_entity.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_user_entity_js_on.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_piece.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
namespace blink {
namespace {
AllOf;
Eq;
Field;
IsNull;
Matcher;
Pointee;
Pointwise;
Property;
String;
#define SUBTEST(F) …
constexpr char kTestB64URL[] = …;
constexpr char kTest2B64URL[] = …;
constexpr char kInvalidB64URL[] = …;
struct CredentialDescriptorValues { … };
struct ExtensionsClientInputsValues { … };
AuthenticationExtensionsClientInputsJSON* MakeExtensionsInputsJSON(
const ExtensionsClientInputsValues& in) { … }
struct CredentialCreationOptionsValues { … };
PublicKeyCredentialCreationOptionsJSON* MakeCreationOptionsJSON(
const CredentialCreationOptionsValues& in) { … }
struct CredentialRequestOptionsValues { … };
PublicKeyCredentialRequestOptionsJSON* MakeRequestOptionsJSON(
const CredentialRequestOptionsValues& in) { … }
MATCHER_P(StrEq, str, "") { … }
MATCHER(StrEq, "") { … }
template <typename T>
Matcher<Member<T>> MemberField(Matcher<T> matcher) { … }
WTF::String Base64URLEncode(DOMArrayPiece buffer) { … }
MATCHER_P(Base64URL, matcher, "") { … }
MATCHER(CredentialDescriptorsEq, "") { … }
MATCHER_P2(PubKeyCredParamsEq, type, alg, "") { … }
MATCHER_P(PRFValuesEq, values, "") { … }
MATCHER(PRFCredIdAndValuesEq, "") { … }
void ExpectExtensionsMatch(
const AuthenticationExtensionsClientInputs& extensions,
const ExtensionsClientInputsValues& values) { … }
void ExpectCreationOptionsMatches(
const PublicKeyCredentialCreationOptions& options,
const CredentialCreationOptionsValues& values) { … }
void ExpectRequestOptionsMatches(
const PublicKeyCredentialRequestOptions& options,
const CredentialRequestOptionsValues& values) { … }
TEST(PublicKeyCredentialTest, ParseCreationOptionsFromJSON) { … }
TEST(PublicKeyCredentialTest, ParseRequestOptions) { … }
TEST(PublicKeyCredentialTest, ParseCreationOptionsFromJSON_Full) { … }
TEST(PublicKeyCredentialTest, ParseRequestOptionsFromJSON_Full) { … }
TEST(PublicKeyCredentialTest, ParseCreationOptionsFromJSON_WithExtensions) { … }
TEST(PublicKeyCredentialTest, ParseRequestOptionsFromJSON_WithExtensions) { … }
TEST(PublicKeyCredentialTest, ParseCreationOptionsFromJSON_InvalidBase64URL) { … }
TEST(PublicKeyCredentialTest, ParseRequestOptionsFromJSON_InvalidBase64URL) { … }
}
}