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

// Copyright 2024 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_search_bar_view.h"

#include <memory>

#include "base/functional/callback_helpers.h"
#include "base/test/mock_callback.h"
#include "base/time/time.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/test/event_generator.h"
#include "ui/events/types/event_type.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_utils.h"

namespace autofill {

namespace {
Eq;
InSequence;
Mock;
MockFunction;
NiceMock;

class MockDelegate : public PopupSearchBarView::Delegate {};

}  // namespace

class PopupSearchBarViewTest : public ChromeViewsTestBase {};

TEST_F(PopupSearchBarViewTest, SetsFocusOnTextfield) {}

TEST_F(PopupSearchBarViewTest, OnFocusLostCalled) {}

TEST_F(PopupSearchBarViewTest, OnInputChangedIsCalledAfterDelay) {}

TEST_F(PopupSearchBarViewTest, OnInputChangedCallbackIsThrottled) {}

// TODO(crbug.com/338934966): Enable when key events suppressing in tests is
// fixed.
#if !BUILDFLAG(IS_WIN)
TEST_F(PopupSearchBarViewTest, KeyPressedFromTextfieldPassedToDelegateFirst) {}
#endif  // !BUILDFLAG(IS_WIN)

TEST_F(PopupSearchBarViewTest, ClearButton) {}
}  // namespace autofill