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

Unified Diff: testing/embedder_test.h

Issue 2258333002: Fix page leaks in an embedder test (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: new approach Created 4 years, 4 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 | « fpdfsdk/fsdk_baseform_embeddertest.cpp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/embedder_test.h
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index 6b814a726771c979792086dd46d7086ed5ee3f33..153ca6e5f3ffce20e5c493451408fabdcce87827 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -51,12 +51,9 @@ class EmbedderTest : public ::testing::Test,
virtual void KillTimer(int id) {}
// Equivalent to FPDF_FORMFILLINFO::FFI_GetPage().
- virtual FPDF_PAGE GetPage(FPDF_FORMHANDLE form_handle,
+ virtual FPDF_PAGE GetPage(FPDF_FORMFILLINFO* info,
FPDF_DOCUMENT document,
int page_index);
-
- private:
- std::map<int, FPDF_PAGE> m_pageMap;
};
EmbedderTest();
@@ -101,10 +98,6 @@ class EmbedderTest : public ::testing::Test,
// Load a specific page of the open document.
virtual FPDF_PAGE LoadPage(int page_number);
- // Load a specific page of the open document using delegate_->GetPage.
- // delegate_->GetPage also caches loaded page.
- virtual FPDF_PAGE LoadAndCachePage(int page_number);
-
// Convert a loaded page into a bitmap.
virtual FPDF_BITMAP RenderPage(FPDF_PAGE page);
@@ -130,6 +123,7 @@ class EmbedderTest : public ::testing::Test,
TestLoader* loader_;
size_t file_length_;
std::unique_ptr<char, pdfium::FreeDeleter> file_contents_;
+ std::map<int, FPDF_PAGE> page_map_;
private:
static void UnsupportedHandlerTrampoline(UNSUPPORT_INFO*, int type);
« no previous file with comments | « fpdfsdk/fsdk_baseform_embeddertest.cpp ('k') | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698