#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/payments/payment_response.h"
#include <memory>
#include <utility>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_object_builder.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_payment_validation_errors.h"
#include "third_party/blink/renderer/modules/credentialmanagement/public_key_credential.h"
#include "third_party/blink/renderer/modules/payments/payment_address.h"
#include "third_party/blink/renderer/modules/payments/payment_state_resolver.h"
#include "third_party/blink/renderer/modules/payments/payment_test_helper.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
namespace blink {
namespace {
class MockPaymentStateResolver final
: public GarbageCollected<MockPaymentStateResolver>,
public PaymentStateResolver { … };
TEST(PaymentResponseTest, DataCopiedOver) { … }
MATCHER_P(ArrayBufferEqualTo, other_buffer, "equal to") { … }
static v8::Local<v8::Object> GetClientExtensionResults(
V8TestingScope& scope,
v8::Local<v8::Object> public_key_credential) { … }
static v8::Local<v8::ArrayBuffer> GetArrayBuffer(V8TestingScope& scope,
v8::Local<v8::Object>& object,
const char* property_key) { … }
TEST(PaymentResponseTest, PaymentResponseDetailsContainsSpcExtensionsPRF) { … }
TEST(PaymentResponseTest,
PaymentResponseDetailsWithUnexpectedJSONFormatString) { … }
TEST(PaymentResponseTest, PaymentResponseDetailsRetrunsTheSameObject) { … }
TEST(PaymentResponseTest, CompleteCalledWithSuccess) { … }
TEST(PaymentResponseTest, CompleteCalledWithFailure) { … }
TEST(PaymentResponseTest, JSONSerializerTest) { … }
}
}