summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-08-25 22:05:18 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-28 21:37:53 +0000
commit38adfc184a53fbe472e48867acfc201ed940e8ee (patch)
treeec78653d39388506b89f7bbf98ae9075d6d36633 /fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
parent4a1493d73135d87d1d4417dd168c92e8902dd12d (diff)
downloadpdfium-38adfc184a53fbe472e48867acfc201ed940e8ee.tar.xz
Implicitly create CFX_WideString() in form tests.
Change-Id: I042c5e843dcf535b2d6676d41c0037e87c59c219 Reviewed-on: https://pdfium-review.googlesource.com/12050 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
index 308ee4ac40..9fd8eec173 100644
--- a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
@@ -211,7 +211,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest, DeleteEntireTextSelection) {
EXPECT_STREQ(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqr",
GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString());
+ GetCPWLComboBox()->ReplaceSelection(L"");
EXPECT_TRUE(GetCPWLComboBox()->GetText().IsEmpty());
}
@@ -222,7 +222,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest, DeleteTextSelectionMiddle) {
GetCPWLComboBox()->SetEditSelection(12, 23);
EXPECT_STREQ(L"MNOPQRSTUVW", GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString());
+ GetCPWLComboBox()->ReplaceSelection(L"");
EXPECT_STREQ(L"ABCDEFGHIJKLXYZ[\\]^_`abcdefghijklmnopqr",
GetCPWLComboBox()->GetText().c_str());
}
@@ -234,7 +234,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest, DeleteTextSelectionLeft) {
GetCPWLComboBox()->SetEditSelection(0, 5);
EXPECT_STREQ(L"ABCDE", GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString());
+ GetCPWLComboBox()->ReplaceSelection(L"");
EXPECT_STREQ(L"FGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqr",
GetCPWLComboBox()->GetText().c_str());
}
@@ -246,7 +246,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest, DeleteTextSelectionRight) {
GetCPWLComboBox()->SetEditSelection(45, 50);
EXPECT_STREQ(L"nopqr", GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString());
+ GetCPWLComboBox()->ReplaceSelection(L"");
EXPECT_STREQ(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklm",
GetCPWLComboBox()->GetText().c_str());
}
@@ -255,14 +255,14 @@ TEST_F(CPWLComboBoxEditEmbeddertest, DeleteEmptyTextSelection) {
FormFillerAndWindowSetup(GetCPDFSDKAnnotUserEditable());
TypeTextIntoTextField(50);
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString());
+ GetCPWLComboBox()->ReplaceSelection(L"");
EXPECT_STREQ(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqr",
GetCPWLComboBox()->GetText().c_str());
}
TEST_F(CPWLComboBoxEditEmbeddertest, InsertTextInEmptyEditableComboBox) {
FormFillerAndWindowSetup(GetCPDFSDKAnnotUserEditable());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"Hello", GetCPWLComboBox()->GetText().c_str());
}
@@ -275,7 +275,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest,
EXPECT_TRUE(GetCFFLFormFiller()->OnKeyDown(GetCPDFSDKAnnotUserEditable(),
FWL_VKEY_Home, 0));
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"HelloABCDEFGHIJ", GetCPWLComboBox()->GetText().c_str());
}
@@ -290,7 +290,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest,
FWL_VKEY_Left, 0));
}
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"ABCDEHelloFGHIJ", GetCPWLComboBox()->GetText().c_str());
}
@@ -299,7 +299,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest,
FormFillerAndWindowSetup(GetCPDFSDKAnnotUserEditable());
TypeTextIntoTextField(10);
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"ABCDEFGHIJHello", GetCPWLComboBox()->GetText().c_str());
}
@@ -310,7 +310,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest,
GetCPWLComboBox()->SetEditSelection(0, -1);
EXPECT_STREQ(L"ABCDEFGHIJ", GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"Hello", GetCPWLComboBox()->GetText().c_str());
}
@@ -321,7 +321,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest,
GetCPWLComboBox()->SetEditSelection(0, 5);
EXPECT_STREQ(L"ABCDE", GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"HelloFGHIJ", GetCPWLComboBox()->GetText().c_str());
}
@@ -332,7 +332,7 @@ TEST_F(CPWLComboBoxEditEmbeddertest,
GetCPWLComboBox()->SetEditSelection(2, 7);
EXPECT_STREQ(L"CDEFG", GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"ABHelloHIJ", GetCPWLComboBox()->GetText().c_str());
}
@@ -343,6 +343,6 @@ TEST_F(CPWLComboBoxEditEmbeddertest,
GetCPWLComboBox()->SetEditSelection(5, 10);
EXPECT_STREQ(L"FGHIJ", GetCPWLComboBox()->GetSelectedText().c_str());
- GetCPWLComboBox()->ReplaceSelection(CFX_WideString(L"Hello"));
+ GetCPWLComboBox()->ReplaceSelection(L"Hello");
EXPECT_STREQ(L"ABCDEHello", GetCPWLComboBox()->GetText().c_str());
}