diff options
author | tsepez <tsepez@chromium.org> | 2016-09-28 16:47:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-28 16:47:07 -0700 |
commit | 698c5716d005860360527e4cfe15b4a185589117 (patch) | |
tree | 7e82388a12f3de2b6fb179181d77b47d2c547df7 /fpdfsdk/fpdfdoc_unittest.cpp | |
parent | 4ba37c6f6964f6a24fc4b8b48bc82c02edb70370 (diff) | |
download | pdfium-698c5716d005860360527e4cfe15b4a185589117.tar.xz |
Use string pools in some dictionaries, names, and strings.
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2345063002
Diffstat (limited to 'fpdfsdk/fpdfdoc_unittest.cpp')
-rw-r--r-- | fpdfsdk/fpdfdoc_unittest.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp index 59f9e31e25..7b185cc48f 100644 --- a/fpdfsdk/fpdfdoc_unittest.cpp +++ b/fpdfsdk/fpdfdoc_unittest.cpp @@ -64,7 +64,7 @@ class PDFDocTest : public testing::Test { m_pDoc.reset(new CPDF_TestPdfDocument()); m_pIndirectObjs = m_pDoc->GetHolder(); // Setup the root directory. - m_pRootObj.reset(new CPDF_Dictionary()); + m_pRootObj.reset(new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>())); m_pDoc->SetRoot(m_pRootObj.get()); } @@ -79,7 +79,8 @@ class PDFDocTest : public testing::Test { std::vector<DictObjInfo> info; for (int i = 0; i < num; ++i) { // Objects created will be released by the document. - CPDF_Dictionary* obj = new CPDF_Dictionary; + CPDF_Dictionary* obj( + new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>())); info.push_back({m_pIndirectObjs->AddIndirectObject(obj), obj}); } return info; @@ -103,7 +104,8 @@ TEST_F(PDFDocTest, FindBookmark) { } { // Empty bookmark tree. - m_pRootObj->SetFor("Outlines", new CPDF_Dictionary()); + m_pRootObj->SetFor("Outlines", + new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>())); std::unique_ptr<unsigned short, pdfium::FreeDeleter> title = GetFPDFWideString(L""); EXPECT_EQ(nullptr, FPDFBookmark_Find(m_pDoc.get(), title.get())); |