Rename CPWLComboBoxEditEmbedderTest::GetCFFLFormFiller()
Commit fa40864b9d3734cdc6a2b98cc8c1373957e0722b renamed class
CFFL_FormFiller to CFFL_FormField, but missed converting this test.
Call the renamed method GetCFFLFormField().
-- Also rename m_pFormFiller to m_pFormField.
-- Re-order headers.
Change-Id: Ifadee2ab336896c0c93fd9583511270a4b6a8124
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/100070
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
index cf8c2c0..df767b5 100644
--- a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "fpdfsdk/pwl/cpwl_combo_box.h"
+
#include "fpdfsdk/cpdfsdk_annotiterator.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
#include "fpdfsdk/cpdfsdk_widget.h"
#include "fpdfsdk/formfiller/cffl_formfield.h"
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
-#include "fpdfsdk/pwl/cpwl_combo_box.h"
#include "fpdfsdk/pwl/cpwl_wnd.h"
#include "public/fpdf_fwlevent.h"
#include "testing/embedder_test.h"
@@ -58,12 +59,12 @@
EXPECT_TRUE(pInteractiveFormFiller->OnSetFocus(pObserved, {}));
}
- m_pFormFiller =
+ m_pFormField =
pInteractiveFormFiller->GetFormFieldForTesting(pAnnotCombobox);
- ASSERT_TRUE(m_pFormFiller);
+ ASSERT_TRUE(m_pFormField);
CPWL_Wnd* pWindow =
- m_pFormFiller->GetPWLWindow(m_pFormFillEnv->GetPageViewAtIndex(0));
+ m_pFormField->GetPWLWindow(m_pFormFillEnv->GetPageViewAtIndex(0));
ASSERT_TRUE(pWindow);
m_pComboBox = static_cast<CPWL_ComboBox*>(pWindow);
}
@@ -71,14 +72,14 @@
void TypeTextIntoTextField(int num_chars) {
// Type text starting with 'A' to as many chars as specified by |num_chars|.
for (int i = 0; i < num_chars; ++i) {
- EXPECT_TRUE(GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnotUserEditable(),
- i + 'A', {}));
+ EXPECT_TRUE(GetCFFLFormField()->OnChar(GetCPDFSDKAnnotUserEditable(),
+ i + 'A', {}));
}
}
FPDF_PAGE GetPage() const { return m_page; }
CPWL_ComboBox* GetCPWLComboBox() const { return m_pComboBox; }
- CFFL_FormField* GetCFFLFormFiller() const { return m_pFormFiller; }
+ CFFL_FormField* GetCFFLFormField() const { return m_pFormField; }
CPDFSDK_Widget* GetCPDFSDKAnnotNormal() const { return m_pAnnotNormal; }
CPDFSDK_Widget* GetCPDFSDKAnnotUserEditable() const {
return m_pAnnotEditable;
@@ -90,7 +91,7 @@
private:
FPDF_PAGE m_page;
CPWL_ComboBox* m_pComboBox;
- CFFL_FormField* m_pFormFiller;
+ CFFL_FormField* m_pFormField;
CPDFSDK_Widget* m_pAnnotNormal;
CPDFSDK_Widget* m_pAnnotEditable;
CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
@@ -115,7 +116,7 @@
EXPECT_STREQ(L"Cherry", GetCPWLComboBox()->GetSelectedText().c_str());
// Verify that combobox text cannot be edited.
- EXPECT_FALSE(GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnotNormal(), 'a', {}));
+ EXPECT_FALSE(GetCFFLFormField()->OnChar(GetCPDFSDKAnnotNormal(), 'a', {}));
}
TEST_F(CPWLComboBoxEditEmbedderTest, GetSelectedTextFragmentsNormal) {
@@ -162,11 +163,11 @@
// Type into editable combobox text field and select new text.
EXPECT_TRUE(
- GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnotUserEditable(), 'a', {}));
+ GetCFFLFormField()->OnChar(GetCPDFSDKAnnotUserEditable(), 'a', {}));
EXPECT_TRUE(
- GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnotUserEditable(), 'b', {}));
+ GetCFFLFormField()->OnChar(GetCPDFSDKAnnotUserEditable(), 'b', {}));
EXPECT_TRUE(
- GetCFFLFormFiller()->OnChar(GetCPDFSDKAnnotUserEditable(), 'c', {}));
+ GetCFFLFormField()->OnChar(GetCPDFSDKAnnotUserEditable(), 'c', {}));
EXPECT_TRUE(GetCPWLComboBox()->GetSelectedText().IsEmpty());
GetCPWLComboBox()->SetEditSelection(0, 5);
@@ -272,7 +273,7 @@
TypeTextIntoTextField(10);
// Move cursor to beginning of user-editable combobox text field.
- EXPECT_TRUE(GetCFFLFormFiller()->OnKeyDown(FWL_VKEY_Home, {}));
+ EXPECT_TRUE(GetCFFLFormField()->OnKeyDown(FWL_VKEY_Home, {}));
GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"HelloABCDEFGHIJ", GetCPWLComboBox()->GetText().c_str());
@@ -285,7 +286,7 @@
// Move cursor to middle of user-editable combobox text field.
for (int i = 0; i < 5; ++i) {
- EXPECT_TRUE(GetCFFLFormFiller()->OnKeyDown(FWL_VKEY_Left, {}));
+ EXPECT_TRUE(GetCFFLFormField()->OnKeyDown(FWL_VKEY_Left, {}));
}
GetCPWLComboBox()->ReplaceSelection(L"Hello");