From d27acae33ff902ee85ae4f8ec76d4f64c294637b Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 15 May 2015 15:36:02 -0700 Subject: Merge to XFA: Fix leaks in the embedder tests themselves. Also change EmbedderTest::TearDown() to match the destruction order in Chromium's PDF code. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1138143003 (cherry picked from commit 61ffad8df484ab9b3f7d2f5519ec470fbc023b88) Review URL: https://codereview.chromium.org/1138973004 --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp index e00887ff5f..882a915edd 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp @@ -16,5 +16,7 @@ TEST_F(FPDFParserEmbeddertest, LoadError_454695) { TEST_F(FPDFParserEmbeddertest, Bug_481363) { // Test colorspace object with malformed dictionary. EXPECT_TRUE(OpenDocument("testing/resources/bug_481363.pdf")); - EXPECT_NE(nullptr, LoadPage(0)); + FPDF_PAGE page = LoadPage(0); + EXPECT_NE(nullptr, page); + UnloadPage(page); } -- cgit v1.2.3