Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: fpdfsdk/fpdftext_embeddertest.cpp

Issue 2342073002: Respect ToUnicode map when it maps a charcode to unicode 0 (Closed)
Patch Set: Add test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdftext/cpdf_textpage.cpp ('k') | testing/resources/bug_583.pdf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdftext_embeddertest.cpp
diff --git a/fpdfsdk/fpdftext_embeddertest.cpp b/fpdfsdk/fpdftext_embeddertest.cpp
index 3070c3077111a1b21db8faad02f53cf45bb4651e..957e813f64803e9085f309cf5f83f0cca8ed266d 100644
--- a/fpdfsdk/fpdftext_embeddertest.cpp
+++ b/fpdfsdk/fpdftext_embeddertest.cpp
@@ -388,3 +388,18 @@ TEST_F(FPDFTextEmbeddertest, GetFontSize) {
FPDFText_ClosePage(textpage);
UnloadPage(page);
}
+
+TEST_F(FPDFTextEmbeddertest, ToUnicode) {
+ EXPECT_TRUE(OpenDocument("bug_583.pdf"));
+ FPDF_PAGE page = LoadPage(0);
+ EXPECT_TRUE(page);
+
+ FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page);
+ EXPECT_TRUE(textpage);
+
+ ASSERT_EQ(1, FPDFText_CountChars(textpage));
+ EXPECT_EQ(static_cast<unsigned int>(0), FPDFText_GetUnicode(textpage, 0));
+
+ FPDFText_ClosePage(textpage);
+ UnloadPage(page);
+}
« no previous file with comments | « core/fpdftext/cpdf_textpage.cpp ('k') | testing/resources/bug_583.pdf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698