summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_edit_embeddertest.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-23 18:04:26 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-23 18:04:26 +0000
commitb557bdcbd1584a7e37f8883b0fc491e0641cfc9c (patch)
tree447c0360d9f2f2555c1c2d19e6f8d7e007e58503 /fpdfsdk/fpdf_edit_embeddertest.cpp
parent0784c7317e3aaa2c65d098cf2593b6b49986307d (diff)
downloadpdfium-b557bdcbd1584a7e37f8883b0fc491e0641cfc9c.tar.xz
Create FPDFPageObjMark_GetParamStringValue().
Bug: pdfium:1037 Change-Id: I05f992d2a4ee5a11b5c57ec51107c4b00011809c Reviewed-on: https://pdfium-review.googlesource.com/31190 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.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index ec6b893530..3da57ab737 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -484,6 +484,20 @@ TEST_F(FPDFEditEmbeddertest, RemoveMarkedObjectsPrime) {
} else if (name == L"GreaterThanTen") {
greater_than_ten_count++;
EXPECT_EQ(0, FPDFPageObjMark_CountParams(mark));
+ } else if (name == L"Bounds") {
+ 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"Position", key);
+ EXPECT_EQ(FPDF_OBJECT_STRING,
+ FPDFPageObjMark_GetParamValueType(mark, 0));
+ ASSERT_GT(FPDFPageObjMark_GetParamStringValue(mark, 0, buffer, 256),
+ 0u);
+ std::wstring value =
+ GetPlatformWString(reinterpret_cast<unsigned short*>(buffer));
+ EXPECT_EQ(L"Last", value);
+ EXPECT_EQ(18, i);
} else {
FAIL();
}