chromium/chrome/browser/ui/views/user_education/browser_feature_promo_controller_interactive_uitest.cc

// Copyright 2022 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/strings/stringprintf.h"
#include "base/time/time.h"
#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"

#include <memory>
#include <utility>

#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "chrome/browser/user_education/user_education_service_factory.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/interaction/interaction_test_util_browser.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "chrome/test/user_education/interactive_feature_promo_test.h"
#include "components/user_education/common/feature_promo_controller.h"
#include "components/user_education/common/feature_promo_data.h"
#include "components/user_education/common/feature_promo_specification.h"
#include "components/user_education/common/feature_promo_storage_service.h"
#include "components/user_education/views/help_bubble_view.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/interaction/element_tracker.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/interaction/widget_focus_observer.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"

_;
AnyNumber;
Ref;
Return;

EndFeaturePromoReason;
FeaturePromoClosedReason;
FeaturePromoRegistry;
FeaturePromoSpecification;

namespace {
BASE_FEATURE();
BASE_FEATURE();
BASE_FEATURE();
}  // namespace

class BrowserFeaturePromoControllerUiTest : public InteractiveFeaturePromoTest {};

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest, LogsAbortMetrics) {}

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest,
                       LogsEngagedMetrics) {}

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest,
                       LogsCustomActionMetrics) {}

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest,
                       CanShowPromoReturnsExpectedValue) {}

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest,
                       CallbackHappensAfterCancel) {}

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest,
                       CallbackHappensAfterConfirm) {}

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerUiTest,
                       CallbackHappensAfterCustomAction) {}

// Using the base interactive browser test re-enables window activation
// checking.
BrowserFeaturePromoControllerActivationUiTest;

IN_PROC_BROWSER_TEST_F(BrowserFeaturePromoControllerActivationUiTest,
                       CanShowPromoForElement) {}