xref: /aosp_15_r20/external/pdfium/core/fpdfapi/parser/cpdf_test_document.cpp (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2022 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "core/fpdfapi/parser/cpdf_test_document.h"
6 
7 #include <memory>
8 #include <utility>
9 
10 #include "core/fpdfapi/page/cpdf_docpagedata.h"
11 #include "core/fpdfapi/render/cpdf_docrenderdata.h"
12 
CPDF_TestDocument()13 CPDF_TestDocument::CPDF_TestDocument()
14     : CPDF_Document(std::make_unique<CPDF_DocRenderData>(),
15                     std::make_unique<CPDF_DocPageData>()) {}
16 
SetRoot(RetainPtr<CPDF_Dictionary> root)17 void CPDF_TestDocument::SetRoot(RetainPtr<CPDF_Dictionary> root) {
18   SetRootForTesting(std::move(root));
19 }
20