chromium/chrome/browser/ui/user_education/show_promo_in_page_browsertest.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 "chrome/browser/ui/user_education/show_promo_in_page.h"

#include <optional>
#include <string>

#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/mock_callback.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/tabs/tab_strip_model_observer.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "components/strings/grit/components_strings.h"
#include "components/user_education/common/help_bubble_params.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"

namespace {

constexpr char kPageWithAnchorURL[] =;
constexpr char kPageWithoutAnchorURL[] =;
constexpr char16_t kBubbleBodyText[] =;

// This should be short enough that tests that *expect* the operation to time
// out should fail. Standard test timeout will be used for tests expected to
// succeed.
constexpr base::TimeDelta kShortTimeoutForTesting =;

// Gets a partially-filled params block with default values. You will still
// need to specify `target_url` and `callback`.
ShowPromoInPage::Params GetDefaultParams() {}

}  // namespace

ShowPromoInPageBrowserTest;

IN_PROC_BROWSER_TEST_F(ShowPromoInPageBrowserTest, ShowPromoInNewPage) {}

IN_PROC_BROWSER_TEST_F(ShowPromoInPageBrowserTest, ShowPromoInSameTab) {}

IN_PROC_BROWSER_TEST_F(ShowPromoInPageBrowserTest, ShowPromoInSamePage) {}

IN_PROC_BROWSER_TEST_F(ShowPromoInPageBrowserTest,
                       ShowPromoInPageFailureCallbackOnTimeout) {}

IN_PROC_BROWSER_TEST_F(ShowPromoInPageBrowserTest,
                       DestroyBrowserBeforeComplete) {}

IN_PROC_BROWSER_TEST_F(ShowPromoInPageBrowserTest,
                       HelpBubbleParamsCanConfigureCloseButtonAltText) {}