| Index: core/fpdfapi/parser/cpdf_document_unittest.cpp
|
| diff --git a/core/fpdfapi/parser/cpdf_document_unittest.cpp b/core/fpdfapi/parser/cpdf_document_unittest.cpp
|
| index e20a5a1d1da50e84ced98b5dccf9f130181fec4f..16d0ade069aa11a0f7c180494888ec5d1a8c5f1c 100644
|
| --- a/core/fpdfapi/parser/cpdf_document_unittest.cpp
|
| +++ b/core/fpdfapi/parser/cpdf_document_unittest.cpp
|
| @@ -9,12 +9,14 @@
|
| #include "core/fpdfapi/cpdf_modulemgr.h"
|
| #include "core/fpdfapi/parser/cpdf_array.h"
|
| #include "core/fpdfapi/parser/cpdf_dictionary.h"
|
| -#include "core/fpdfapi/parser/cpdf_linearized.h"
|
| #include "core/fpdfapi/parser/cpdf_parser.h"
|
| #include "core/fxcrt/fx_memory.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace {
|
| +
|
| +using ScopedDictionary =
|
| + std::unique_ptr<CPDF_Dictionary, ReleaseDeleter<CPDF_Dictionary>>;
|
|
|
| CPDF_Dictionary* CreatePageTreeNode(CPDF_Array* kids,
|
| CPDF_Document* pDoc,
|
| @@ -74,11 +76,6 @@
|
|
|
| private:
|
| std::unique_ptr<CPDF_Dictionary> m_pOwnedRootDict;
|
| -};
|
| -
|
| -class TestLinearized : public CPDF_Linearized {
|
| - public:
|
| - explicit TestLinearized(CPDF_Dictionary* dict) : CPDF_Linearized(dict) {}
|
| };
|
| } // namespace
|
|
|
| @@ -145,12 +142,10 @@
|
| // can be not exists in this case.
|
| // (case, when hint table is used to page check in CPDF_DataAvail).
|
| CPDF_Document document(pdfium::MakeUnique<CPDF_Parser>());
|
| - auto dict = pdfium::MakeUnique<CPDF_Dictionary>();
|
| - dict->SetBooleanFor("Linearized", true);
|
| + std::unique_ptr<CPDF_Dictionary> dict(new CPDF_Dictionary());
|
| const int page_count = 100;
|
| dict->SetIntegerFor("N", page_count);
|
| - TestLinearized linearized(dict.get());
|
| - document.LoadLinearizedDoc(&linearized);
|
| + document.LoadLinearizedDoc(dict.get());
|
| ASSERT_EQ(page_count, document.GetPageCount());
|
| CPDF_Object* page_stub = new CPDF_Dictionary();
|
| const uint32_t obj_num = document.AddIndirectObject(page_stub);
|
|
|