From 29ce9238c6a05abb1de5e4175c97e4fcadd5640f Mon Sep 17 00:00:00 2001 From: thestig Date: Wed, 22 Jun 2016 07:03:23 -0700 Subject: Fix memory leaks in EmbedderTest::OpenDocument(). EmbedderTest::OpenDocument() does not gracefully handle the case of being called twice in a given test case. So avoid doing that. Review-Url: https://codereview.chromium.org/2088093002 --- core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/fpdfapi/fpdf_parser') diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp index 66b29a91c4..f523d6b31b 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_parser_embeddertest.cpp @@ -35,8 +35,11 @@ TEST_F(CPDFParserEmbeddertest, Feature_Linearized_Loading) { EXPECT_TRUE(OpenDocument("feature_linearized_loading.pdf", nullptr, true)); } -TEST_F(CPDFParserEmbeddertest, Bug_325) { +TEST_F(CPDFParserEmbeddertest, Bug_325a) { EXPECT_FALSE(OpenDocument("bug_325_a.pdf")); +} + +TEST_F(CPDFParserEmbeddertest, Bug_325b) { EXPECT_FALSE(OpenDocument("bug_325_b.pdf")); } -- cgit v1.2.3