chromium/chrome/browser/ui/views/autofill/popup/popup_row_factory_utils_browsertest.cc

// Copyright 2023 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/views/autofill/popup/popup_row_factory_utils.h"

#include <memory>
#include <optional>
#include <string>

#include "base/strings/utf_string_conversions.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
#include "chrome/browser/ui/autofill/mock_autofill_popup_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/test/test_browser_ui.h"
#include "chrome/browser/ui/views/autofill/popup/mock_accessibility_selection_delegate.h"
#include "chrome/browser/ui/views/autofill/popup/mock_selection_delegate.h"
#include "chrome/browser/ui/views/autofill/popup/password_favicon_loader.h"
#include "chrome/browser/ui/views/autofill/popup/popup_row_view.h"
#include "components/autofill/core/browser/ui/suggestion.h"
#include "components/autofill/core/browser/ui/suggestion_type.h"
#include "components/compose/core/browser/compose_features.h"
#include "components/user_education/common/new_badge_controller.h"
#include "components/user_education/common/user_education_features.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/range/range.h"
#include "ui/resources/grit/ui_resources.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/widget.h"

namespace autofill {

NiceMock;
Return;

namespace {

Suggestion CreatePasswordSuggestion(const std::u16string& main_text) {}

Suggestion CreateSuggestionWithChildren(const std::u16string& main_text,
                                        std::vector<Suggestion> children) {}

// Suggestion main text (Suggestion::main_text) is used for the test and
// screenshot names, avoid special symbols and keep them unique.
const Suggestion kSuggestions[] =;
const Suggestion kExpandableSuggestions[] =;

class MockPasswordFaviconLoader : public PasswordFaviconLoader {};
}  // namespace

// TODO(crbug.com/40285052): Add tests for RTL and dark mode.
TestParams;

class BaseCreatePopupRowViewTest
    : public UiBrowserTest,
      public ::testing::WithParamInterface<TestParams> {};

class CreatePopupRowViewTest : public BaseCreatePopupRowViewTest {};

IN_PROC_BROWSER_TEST_P(CreatePopupRowViewTest, SuggestionRowUiTest) {}

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

IN_PROC_BROWSER_TEST_F(CreatePopupRowViewTest, FilterMatchHighlighting) {}

IN_PROC_BROWSER_TEST_F(CreatePopupRowViewTest, PasswordWithFaviconPlaceholder) {}

IN_PROC_BROWSER_TEST_F(CreatePopupRowViewTest, PasswordCustomIconLoader) {}

class CreatePopupRowViewWithNoUserEducationRateLimitTest
    : public BaseCreatePopupRowViewTest {};

IN_PROC_BROWSER_TEST_F(CreatePopupRowViewWithNoUserEducationRateLimitTest,
                       ComposeWithNewBadge) {}

}  // namespace autofill