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

Unified Diff: testing/embedder_test.cpp

Issue 857483005: Follow-on to pdfium_embeddertests. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix copyright. Created 5 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 | « testing/embedder_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/embedder_test.cpp
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index 7b8498345a40536f40f0cbde93782c20afc77fee..e823347ef1b23d6ec0759d05842a41098754e5dd 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -195,6 +195,9 @@ void EmbedderTest::SetUp() {
void EmbedderTest::TearDown() {
FPDF_CloseDocument(document_);
FPDFAvail_Destroy(avail_);
+ if (loader_) {
+ delete loader_;
+ }
if (file_contents_) {
free(file_contents_);
}
@@ -206,11 +209,10 @@ bool EmbedderTest::OpenDocument(const std::string& filename) {
return false;
}
- TestLoader loader(file_contents_, file_length_);
-
+ loader_ = new TestLoader(file_contents_, file_length_);
file_access_.m_FileLen = static_cast<unsigned long>(file_length_);
file_access_.m_GetBlock = Get_Block;
- file_access_.m_Param = &loader;
+ file_access_.m_Param = loader_;
file_avail_.version = 1;
file_avail_.IsDataAvail = Is_Data_Avail;
« no previous file with comments | « testing/embedder_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698