#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 { … };
}
class PopupSearchBarViewTest : public ChromeViewsTestBase { … };
TEST_F(PopupSearchBarViewTest, SetsFocusOnTextfield) { … }
TEST_F(PopupSearchBarViewTest, OnFocusLostCalled) { … }
TEST_F(PopupSearchBarViewTest, OnInputChangedIsCalledAfterDelay) { … }
TEST_F(PopupSearchBarViewTest, OnInputChangedCallbackIsThrottled) { … }
#if !BUILDFLAG(IS_WIN)
TEST_F(PopupSearchBarViewTest, KeyPressedFromTextfieldPassedToDelegateFirst) { … }
#endif
TEST_F(PopupSearchBarViewTest, ClearButton) { … }
}