#include <utility>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "content/browser/payments/payment_app_content_unittest_base.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/payments/payment_app.mojom.h"
#include "url/gurl.h"
namespace content {
namespace {
PaymentHandlerStatus;
PaymentInstrument;
PaymentInstrumentPtr;
const char kServiceWorkerScope[] = …;
const char kServiceWorkerScript[] = …;
void DeletePaymentInstrumentCallback(PaymentHandlerStatus* out_status,
PaymentHandlerStatus status) { … }
void SetPaymentInstrumentCallback(PaymentHandlerStatus* out_status,
PaymentHandlerStatus status) { … }
void KeysOfPaymentInstrumentsCallback(std::vector<std::string>* out_keys,
PaymentHandlerStatus* out_status,
const std::vector<std::string>& keys,
PaymentHandlerStatus status) { … }
void HasPaymentInstrumentCallback(PaymentHandlerStatus* out_status,
PaymentHandlerStatus status) { … }
void GetPaymentInstrumentCallback(PaymentInstrumentPtr* out_instrument,
PaymentHandlerStatus* out_status,
PaymentInstrumentPtr instrument,
PaymentHandlerStatus status) { … }
void ClearPaymentInstrumentsCallback(PaymentHandlerStatus* out_status,
PaymentHandlerStatus status) { … }
}
class PaymentManagerTest : public PaymentAppContentUnitTestBase { … };
TEST_F(PaymentManagerTest, GetUnstoredPaymentInstrument) { … }
TEST_F(PaymentManagerTest, DeletePaymentInstrument) { … }
TEST_F(PaymentManagerTest, HasPaymentInstrument) { … }
TEST_F(PaymentManagerTest, KeysOfPaymentInstruments) { … }
TEST_F(PaymentManagerTest, ClearPaymentInstruments) { … }
TEST_F(PaymentManagerTest, SetAndGetPaymentInstrument) { … }
}