diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-04-23 16:35:56 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-23 16:35:56 +0000 |
commit | 132c38e7bdd0bdd1aa526b35c7bcb79c286fb061 (patch) | |
tree | 20801fa3c9ce77a72d2195dcd6e2daba8298d853 /fpdfsdk/fpdf_edit_embeddertest.cpp | |
parent | fd016f4e9b0df99ed4670b50b30e5c6f18028f9a (diff) | |
download | pdfium-132c38e7bdd0bdd1aa526b35c7bcb79c286fb061.tar.xz |
Create API to get PageObject mark parameters.
New calls added in this cl:
- FPDFPageObjMark_GetParamKey
- FPDFPageObjMark_GetParamValueType
- FPDFPageObjMark_GetParamIntValue
Bug: pdfium:1037
Change-Id: Iedb74ddbf8a5483de62094ec295dadd6367d5175
Reviewed-on: https://pdfium-review.googlesource.com/30912
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_edit_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/fpdf_edit_embeddertest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index 8f54bf8eab..ec6b893530 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp @@ -473,6 +473,14 @@ TEST_F(FPDFEditEmbeddertest, RemoveMarkedObjectsPrime) { } else if (name == L"Square") { square_count++; EXPECT_EQ(1, FPDFPageObjMark_CountParams(mark)); + ASSERT_GT(FPDFPageObjMark_GetParamKey(mark, 0, buffer, 256), 0u); + std::wstring key = + GetPlatformWString(reinterpret_cast<unsigned short*>(buffer)); + EXPECT_EQ(L"Factor", key); + EXPECT_EQ(FPDF_OBJECT_NUMBER, + FPDFPageObjMark_GetParamValueType(mark, 0)); + int square_root = FPDFPageObjMark_GetParamIntValue(mark, 0); + EXPECT_EQ(i + 1, square_root * square_root); } else if (name == L"GreaterThanTen") { greater_than_ten_count++; EXPECT_EQ(0, FPDFPageObjMark_CountParams(mark)); |