chromium/chrome/browser/payments/android_payment_app_factory_browsertest.cc

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

#include "base/test/scoped_feature_list.h"
#include "build/chromeos_buildflags.h"
#include "chrome/test/payments/payment_app_install_util.h"
#include "chrome/test/payments/payment_request_platform_browsertest_base.h"
#include "components/payments/core/features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/public/cpp/external_arc/overlay/arc_overlay_manager.h"
#endif

namespace payments {
namespace {

struct [[maybe_unused]] ScopedTestSupport {};

class AndroidPaymentAppFactoryTest
    : public PaymentRequestPlatformBrowserTestBase {};

// Even if a service worker app for app store payment method is installed, it
// should be ignored.
IN_PROC_BROWSER_TEST_F(AndroidPaymentAppFactoryTest,
                       IgnoreInstalledPlayBillingServiceWorker) {}

// When an app store payment method app is available in a trusted web activity,
// then ignore other payment apps, since this is considered to be a digital
// goods purchase.
IN_PROC_BROWSER_TEST_F(AndroidPaymentAppFactoryTest,
                       IgnoreOtherPaymentAppsInTwaWhenHaveAppStoreBilling) {}

// https://play.google.com/billing payment method.
IN_PROC_BROWSER_TEST_F(AndroidPaymentAppFactoryTest, PlayBillingPaymentMethod) {}

// Passing a promise into PaymentRequest.show() should skip browser sheet with
// https://play.google.com/billing payment method.
IN_PROC_BROWSER_TEST_F(AndroidPaymentAppFactoryTest,
                       ShowPromiseShouldSkipBrowserPaymentSheet) {}

// PaymentRequest.show(Promise.resolve({})) should skip browser sheet with
// https://play.google.com/billing payment method.
IN_PROC_BROWSER_TEST_F(AndroidPaymentAppFactoryTest,
                       EmptyShowPromiseShouldSkipBrowserPaymentSheet) {}

}  // namespace
}  // namespace payments