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

Unified Diff: fpdfsdk/src/fpdfview_embeddertest.cpp

Issue 1582193002: Loose checking for trailer's size field (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 11 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/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | testing/resources/bug_213.pdf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp
index 3147c01660ee2102b877787aac5a1fe118b4cde8..4e7c9e1d7534b7169dbad6008251feabdba60df2 100644
--- a/fpdfsdk/src/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/src/fpdfview_embeddertest.cpp
@@ -227,4 +227,10 @@ TEST_F(FPDFViewEmbeddertest, Hang_343) {
// dictionary will not cause an infinite loop in CPDF_SyntaxParser::GetObject().
TEST_F(FPDFViewEmbeddertest, Hang_344) {
EXPECT_FALSE(OpenDocument("bug_344.pdf"));
-}
+}
+
+// It tests that document can still be loaded even the trailer has no 'Size'
Lei Zhang 2016/01/14 19:26:15 Move up to line 206 to keep the bug numbers sorted
Wei Li 2016/01/14 22:36:56 Done.
+// field if other information is right.
+TEST_F(FPDFViewEmbeddertest, Failed_213) {
+ EXPECT_TRUE(OpenDocument("bug_213.pdf"));
+}
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | testing/resources/bug_213.pdf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698