summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-05 19:24:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-05 19:24:42 +0000
commit778e59ed40ed31f6176a68253b694acd31f640c9 (patch)
tree8fbaac034139d4a64a561f481c56eaf28d2b8118 /core/fpdfapi/edit
parent354ed202ccd4d6b9d408789a30517ebb1633570b (diff)
downloadpdfium-778e59ed40ed31f6176a68253b694acd31f640c9.tar.xz
Tidy parser lifecycle state machine in CPDF_PageObjectHolder.
Only update state in CPDF_PageObjectHolder itself. Make more data private. Remove CPDF_Page::GetPageBBox() as exact duplicate of CPDF_PageObjectHolder::GetBBox(). Change-Id: I083ec33f61a1490e7a5e673c9787751af15a6cd1 Reviewed-on: https://pdfium-review.googlesource.com/33810 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
index 1244b12331..5d9e029267 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
@@ -299,7 +299,8 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessEmptyForm) {
auto pTestForm =
pdfium::MakeUnique<CPDF_Form>(pDoc.get(), nullptr, pStream.get());
pTestForm->ParseContent(nullptr, nullptr, nullptr, nullptr);
- ASSERT_TRUE(pTestForm->IsParsed());
+ ASSERT_EQ(CPDF_PageObjectHolder::ParseState::kParsed,
+ pTestForm->GetParseState());
// The generated stream for the empty form should be an empty string.
CPDF_PageContentGenerator generator(pTestForm.get());
@@ -325,7 +326,8 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessFormWithPath) {
auto pTestForm =
pdfium::MakeUnique<CPDF_Form>(pDoc.get(), nullptr, pStream.get());
pTestForm->ParseContent(nullptr, nullptr, nullptr, nullptr);
- ASSERT_TRUE(pTestForm->IsParsed());
+ ASSERT_EQ(CPDF_PageObjectHolder::ParseState::kParsed,
+ pTestForm->GetParseState());
CPDF_PageContentGenerator generator(pTestForm.get());
std::ostringstream process_buf;