diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-09 22:12:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-09 22:12:49 +0000 |
commit | 8e926a4c3079de0d56304258b460592c92c3a902 (patch) | |
tree | e399aa393786c186e5f33c3aea91bfd3c4a016d8 /fpdfsdk | |
parent | 95860d77fb882317da74ec614ff841fcacdcaa83 (diff) | |
download | pdfium-8e926a4c3079de0d56304258b460592c92c3a902.tar.xz |
Beef up FPDFTransformEmbedderTest.
Change-Id: I53b7c24c2b8f126cb2d2c676a02ccade76966fe8
Reviewed-on: https://pdfium-review.googlesource.com/c/43753
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdf_transformpage_embeddertest.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_transformpage_embeddertest.cpp b/fpdfsdk/fpdf_transformpage_embeddertest.cpp index 1ebd0f054c..0a8e3e72e3 100644 --- a/fpdfsdk/fpdf_transformpage_embeddertest.cpp +++ b/fpdfsdk/fpdf_transformpage_embeddertest.cpp @@ -99,3 +99,24 @@ TEST_F(FPDFTransformEmbedderTest, NoCropBox) { UnloadPage(page); } + +TEST_F(FPDFTransformEmbedderTest, ClipPath) { + ASSERT_TRUE(OpenDocument("hello_world.pdf")); + + FPDF_PAGE page = LoadPage(0); + ASSERT_TRUE(page); + + FPDF_CLIPPATH clip = FPDF_CreateClipPath(10.0f, 10.0f, 90.0f, 90.0f); + EXPECT_TRUE(clip); + + // NULL arg call is a no-op. + FPDFPage_InsertClipPath(nullptr, clip); + + // Do actual work. + FPDFPage_InsertClipPath(page, clip); + + // TODO(tsepez): test how inserting path affects page rendering. + + FPDF_DestroyClipPath(clip); + UnloadPage(page); +} |