summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-05-08 18:14:19 +0200
committerChromium commit bot <commit-bot@chromium.org>2017-05-08 16:33:15 +0000
commit1ef04c9bc0c19dd815f64ec48e7eef106cf88b49 (patch)
tree7d824dbd9e3aa7faa72c79a622278f0d8903ecfc
parentd1c9b45aa2dc3a3d6824059e1e8f1f046c59a4f3 (diff)
downloadpdfium-chromium/3094.tar.xz
fpdfsdk: add minimal FPDFPageObj_GetType() testcasechromium/3094
I did not realize it's possible to easily test public API when the function itself was added in commit 1423319f52c5e80253d337ad02b19187c6d66ff1 (Add public method FPDFPageObj_GetType to get type of a page object., 2017-04-03). Change-Id: I4b6f4a18eabbebbebb350e69db2b187b35c38da6 Reviewed-on: https://pdfium-review.googlesource.com/5071 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index 05b665b33f..ed5fe3e7f8 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -265,6 +265,9 @@ TEST_F(FPDFEditEmbeddertest, AddPaths) {
FPDF_PAGEOBJECT green_rect = FPDFPageObj_CreateNewRect(100, 100, 40, 40);
EXPECT_TRUE(FPDFPath_SetFillColor(green_rect, 0, 255, 0, 128));
+ // Make sure the type of the rectangle is a path.
+ EXPECT_EQ(FPDF_PAGEOBJ_PATH, FPDFPageObj_GetType(green_rect));
+
// Make sure we get back the same color we set previously.
unsigned int R;
unsigned int G;