chromium/chrome/browser/ui/views/payments/payment_request_journey_logger_browsertest.cc

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

#include <utility>

#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
#include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/payments/core/journey_logger.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source.h"

namespace payments {

namespace {

Event2;

int toInt(Event2 event) {}

}  // namespace

PaymentRequestJourneyLoggerSelectedPaymentAppTest;

// Tests that the selected app metric is correctly logged when the
// Payment Request is completed with a payment handler.
IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerSelectedPaymentAppTest,
                       TestSelectedPaymentMethod) {}

PaymentRequestJourneyLoggerNoSupportedPaymentMethodTest;

IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerNoSupportedPaymentMethodTest,
                       OnlyBobpaySupported) {}

PaymentRequestJourneyLoggerMultipleShowTest;

IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerMultipleShowTest,
                       ShowSameRequest) {}

IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerMultipleShowTest,
                       StartNewRequest) {}

PaymentRequestJourneyLoggerAllSectionStatsTest;

// Tests that the correct PaymentRequest.Events metrics are logged when a
// Payment Request is completed.
IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerAllSectionStatsTest,
                       EventsMetric_Completed) {}

// Tests that the correct PaymentRequest.Events metrics are logged when a
// Payment Request is aborted by the user.
IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerAllSectionStatsTest,
                       EventsMetric_UserAborted) {}

PaymentRequestJourneyLoggerNoShippingSectionStatsTest;

// Tests that the correct PaymentRequest.Events metrics are logged when a
// Payment Request is completed.
IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerNoShippingSectionStatsTest,
                       EventsMetric_Completed) {}

// Tests that the correct PaymentRequest.Events metrics are logged when a
// Payment Request is aborted by the user.
IN_PROC_BROWSER_TEST_F(PaymentRequestJourneyLoggerNoShippingSectionStatsTest,
                       EventsMetric_UserAborted) {}

PaymentRequestJourneyLoggerNoContactDetailSectionStatsTest;

// Tests that the correct PaymentRequest.Events metrics are logged when a
// Payment Request is completed.
IN_PROC_BROWSER_TEST_F(
    PaymentRequestJourneyLoggerNoContactDetailSectionStatsTest,
    EventsMetric_Completed) {}

// Tests that the correct PaymentRequest.Events metrics are logged when a
// Payment Request is aborted by the user.
IN_PROC_BROWSER_TEST_F(
    PaymentRequestJourneyLoggerNoContactDetailSectionStatsTest,
    EventsMetric_UserAborted) {}

PaymentRequestNotShownTest;

IN_PROC_BROWSER_TEST_F(PaymentRequestNotShownTest, OnlyNotShownMetricsLogged) {}

PaymentRequestCompleteSuggestionsForEverythingTest;

IN_PROC_BROWSER_TEST_F(PaymentRequestCompleteSuggestionsForEverythingTest,
                       UserHadCompleteSuggestionsForEverything) {}

class PaymentRequestIframeTest : public PaymentRequestBrowserTestBase {};

IN_PROC_BROWSER_TEST_F(PaymentRequestIframeTest, CrossOriginIframe) {}

IN_PROC_BROWSER_TEST_F(PaymentRequestIframeTest, IframeNavigation_UserAborted) {}

IN_PROC_BROWSER_TEST_F(PaymentRequestIframeTest, IframeNavigation_Completed) {}

IN_PROC_BROWSER_TEST_F(PaymentRequestIframeTest, HistoryPushState_UserAborted) {}

IN_PROC_BROWSER_TEST_F(PaymentRequestIframeTest, HistoryPushState_Completed) {}

}  // namespace payments