summaryrefslogtreecommitdiff
path: root/testing/embedder_test.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-06 10:16:32 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-06 10:16:32 -0800
commit0aa3531a87dde44ffd90416f6d621b1828edaf22 (patch)
tree9b5f0e12a5e1aec13fd3d4f0242efcc6834d830e /testing/embedder_test.cpp
parentd483eb46d8920547d1b47351e65fa0299eaba191 (diff)
downloadpdfium-0aa3531a87dde44ffd90416f6d621b1828edaf22.tar.xz
Merge to XFA: Return unique_ptrs from test_support functions
Orignal Review URL: https://codereview.chromium.org/1563513002 . (cherry picked from commit aa326bd6b169dc1b5b9b83048c71799799ab34c6) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1564583004 .
Diffstat (limited to 'testing/embedder_test.cpp')
-rw-r--r--testing/embedder_test.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index 7224e227c6..ceca205666 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -99,7 +99,6 @@ void EmbedderTest::TearDown() {
#endif // PDF_ENABLE_V8
delete loader_;
- free(file_contents_);
}
bool EmbedderTest::CreateEmptyDocument() {
@@ -120,7 +119,7 @@ bool EmbedderTest::OpenDocument(const std::string& filename,
if (!file_contents_)
return false;
- loader_ = new TestLoader(file_contents_, file_length_);
+ loader_ = new TestLoader(file_contents_.get(), file_length_);
file_access_.m_FileLen = static_cast<unsigned long>(file_length_);
file_access_.m_GetBlock = TestLoader::GetBlock;
file_access_.m_Param = loader_;