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

Unified Diff: fpdfsdk/fpdftext_embeddertest.cpp

Issue 1896303002: Remove CFX_ArrayTemplate from CPDF_LinkExtract (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update API doc and make behaviour match. Created 4 years, 8 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 | « fpdfsdk/fpdftext.cpp ('k') | public/fpdf_text.h » ('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 a5215c20cc9276c7427e004cedba6b32a48c7138..f3e7526c20db3bb734e7175c63162d48247d4060 100644
--- a/fpdfsdk/fpdftext_embeddertest.cpp
+++ b/fpdfsdk/fpdftext_embeddertest.cpp
@@ -276,10 +276,10 @@ TEST_F(FPDFTextEmbeddertest, WebLinks) {
// Page contains two HTTP-style URLs.
EXPECT_EQ(2, FPDFLink_CountWebLinks(pagelink));
- // Only a terminating NUL required for bogus links.
- EXPECT_EQ(1, FPDFLink_GetURL(pagelink, 2, nullptr, 0));
- EXPECT_EQ(1, FPDFLink_GetURL(pagelink, 1400, nullptr, 0));
- EXPECT_EQ(1, FPDFLink_GetURL(pagelink, -1, nullptr, 0));
+ // Zero returned for bogus links.
Lei Zhang 2016/04/20 21:36:49 Isn't this changing the public API behavior? Won't
+ EXPECT_EQ(0, FPDFLink_GetURL(pagelink, 2, nullptr, 0));
+ EXPECT_EQ(0, FPDFLink_GetURL(pagelink, 1400, nullptr, 0));
+ EXPECT_EQ(0, FPDFLink_GetURL(pagelink, -1, nullptr, 0));
// Query the number of characters required for each link (incl NUL).
EXPECT_EQ(25, FPDFLink_GetURL(pagelink, 0, nullptr, 0));
« no previous file with comments | « fpdfsdk/fpdftext.cpp ('k') | public/fpdf_text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698