chromium/chrome/browser/payments/payment_handler_change_shipping_address_option_browsertest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <string>

#include "base/strings/utf_string_conversions.h"
#include "chrome/test/payments/payment_request_platform_browsertest_base.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace payments {
namespace {

constexpr const char* kNoMerchantResponseExpectedOutput =;
constexpr const char* kPromiseRejectedExpectedOutput =;
constexpr const char* kExeptionThrownExpectedOutput =;
constexpr const char* kSuccessfulMerchantResponseExpectedOutput =;

enum class ChangeType {};

struct TestCase {};

class PaymentHandlerChangeShippingAddressOptionTest
    : public PaymentRequestPlatformBrowserTestBase,
      public testing::WithParamInterface<TestCase> {};

IN_PROC_BROWSER_TEST_P(PaymentHandlerChangeShippingAddressOptionTest, Test) {}

// If the merchant does not have a "shipping(address|option)change" event
// handler, then calling PaymentRequestEvent.changeShipping(Address|Option)() in
// the payment handler will return null.
INSTANTIATE_TEST_SUITE_P();

// If the merchant responds to the "payment(address|option)change" event with a
// rejected promise or throws an "Error" inside the promise, then
// PaymentRequest.show() gets rejected.
INSTANTIATE_TEST_SUITE_P();

// If the merchant responds to a "payment(address|option)change" event with
// updated details, including modifiers for multiple payment method
// names, then the invoked payment handler receives the updated details,
// except the modifiers for non-matching payment method names.
INSTANTIATE_TEST_SUITE_P();

}  // namespace
}  // namespace payments