1 // Copyright 2022 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef FPDFSDK_PWL_CPWL_COMBO_BOX_EMBEDDERTEST_H_ 6 #define FPDFSDK_PWL_CPWL_COMBO_BOX_EMBEDDERTEST_H_ 7 8 #include "public/fpdfview.h" 9 #include "testing/embedder_test.h" 10 #include "testing/gtest/include/gtest/gtest.h" 11 12 class CFFL_FormField; 13 class CPDFSDK_FormFillEnvironment; 14 class CPDFSDK_PageView; 15 class CPDFSDK_Widget; 16 class CPWL_ComboBox; 17 18 class CPWLComboBoxEmbedderTest : public EmbedderTest { 19 protected: 20 void SetUp() override; 21 void TearDown() override; 22 23 void CreateAndInitializeFormComboboxPDF(); 24 void FormFillerAndWindowSetup(CPDFSDK_Widget* pAnnotCombobox); 25 void TypeTextIntoTextField(int num_chars); GetPage()26 FPDF_PAGE GetPage() const { return m_page; } GetCPWLComboBox()27 CPWL_ComboBox* GetCPWLComboBox() const { return m_pComboBox; } GetCFFLFormField()28 CFFL_FormField* GetCFFLFormField() const { return m_pFormField; } GetCPDFSDKAnnotNormal()29 CPDFSDK_Widget* GetCPDFSDKAnnotNormal() const { return m_pAnnotNormal; } GetCPDFSDKAnnotUserEditable()30 CPDFSDK_Widget* GetCPDFSDKAnnotUserEditable() const { 31 return m_pAnnotEditable; 32 } GetCPDFSDKFormFillEnv()33 CPDFSDK_FormFillEnvironment* GetCPDFSDKFormFillEnv() const { 34 return m_pFormFillEnv; 35 } GetPageView()36 CPDFSDK_PageView* GetPageView() const { return m_pPageView; } 37 38 private: 39 FPDF_PAGE m_page; 40 CPWL_ComboBox* m_pComboBox = nullptr; 41 CFFL_FormField* m_pFormField = nullptr; 42 CPDFSDK_Widget* m_pAnnotNormal = nullptr; 43 CPDFSDK_Widget* m_pAnnotEditable = nullptr; 44 CPDFSDK_FormFillEnvironment* m_pFormFillEnv = nullptr; 45 CPDFSDK_PageView* m_pPageView = nullptr; 46 }; 47 48 #endif // FPDFSDK_PWL_CPWL_COMBO_BOX_EMBEDDERTEST_H_ 49