| Index: core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp
|
| diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp
|
| index f427ec5d811798de55e27df2185707d493d1c4e6..042b221554fecfad98c082bd6043e0dc94766d9d 100644
|
| --- a/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp
|
| +++ b/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "public/fpdf_text.h"
|
| #include "testing/embedder_test.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -38,3 +39,18 @@ TEST_F(CPDFParserEmbeddertest, Bug_325) {
|
| EXPECT_FALSE(OpenDocument("bug_325_a.pdf"));
|
| EXPECT_FALSE(OpenDocument("bug_325_b.pdf"));
|
| }
|
| +
|
| +TEST_F(CPDFParserEmbeddertest, Bug_602650) {
|
| + // Test the case that cross reference entries, which are well formed,
|
| + // but do not match with the objects.
|
| + EXPECT_TRUE(OpenDocument("bug_602650.pdf"));
|
| + FPDF_PAGE page = LoadPage(0);
|
| + EXPECT_NE(nullptr, page);
|
| + FPDF_TEXTPAGE text_page = FPDFText_LoadPage(page);
|
| + EXPECT_NE(nullptr, text_page);
|
| + // The page should not be blank.
|
| + EXPECT_LT(0, FPDFText_CountChars(text_page));
|
| +
|
| + FPDFText_ClosePage(text_page);
|
| + UnloadPage(page);
|
| +}
|
|
|