chromium/chrome/browser/ui/views/user_education/tutorial_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/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/tabs/tab_close_button.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/interaction/interaction_test_util_browser.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "chrome/test/interaction/tracked_element_webcontents.h"
#include "components/user_education/common/feature_promo_controller.h"
#include "components/user_education/common/help_bubble_params.h"
#include "components/user_education/common/tutorial.h"
#include "components/user_education/common/tutorial_description.h"
#include "components/user_education/common/tutorial_registry.h"
#include "components/user_education/common/tutorial_service.h"
#include "components/user_education/views/help_bubble_factory_views.h"
#include "components/user_education/views/help_bubble_view.h"
#include "components/user_education/webui/tracked_element_webui.h"
#include "content/public/test/browser_test.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/interaction/element_tracker.h"
#include "ui/base/interaction/expect_call_in_scope.h"
#include "ui/base/interaction/interaction_sequence.h"
#include "ui/base/interaction/interaction_sequence_test_util.h"
#include "ui/base/interaction/interaction_test_util.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/interaction/interaction_test_util_views.h"

namespace {
constexpr char kTestTutorialId[] =;
constexpr char kTestTutorialMetricPrefix[] =;
DEFINE_LOCAL_CUSTOM_ELEMENT_EVENT_TYPE();
}  // namespace

FeaturePromoControllerCommon;
HelpBubbleArrow;
HelpBubbleViews;
TutorialDescription;
TutorialService;

class TutorialInteractiveUitest : public InProcessBrowserTest {};

IN_PROC_BROWSER_TEST_F(TutorialInteractiveUitest, SampleTutorial) {}

class WebUITutorialInteractiveUitest : public InteractiveBrowserTest {};

// Regression test for crbug.com/1425161.
IN_PROC_BROWSER_TEST_F(WebUITutorialInteractiveUitest,
                       CloseTabWithTutorialBubble) {}

// Regression test for a possible cause of crbug.com/1474307.
IN_PROC_BROWSER_TEST_F(WebUITutorialInteractiveUitest,
                       CancelTutorialClosesBubble) {}

// Regression test for a possible cause of crbug.com/1474307.
IN_PROC_BROWSER_TEST_F(WebUITutorialInteractiveUitest,
                       StartTutorialTwiceInARow) {}