diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-18 12:17:14 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-18 17:19:26 +0000 |
commit | 04e4dc88da34c323e7a16586bddf377a610d63c5 (patch) | |
tree | 3edad973a50e8a24aed47a4aa6ab6e267720876a /core/fpdfapi | |
parent | 854d71c1420eb80ec79755a6cdf829f3f39aead7 (diff) | |
download | pdfium-04e4dc88da34c323e7a16586bddf377a610d63c5.tar.xz |
Fix rounding of colour values
This CL fixes rounding issues with the colour values when written then
read from path objects.
Bug: pdfium:919
Change-Id: I8ab33706f1c7d81c3ec755706b1a613cf2a557b3
Reviewed-on: https://pdfium-review.googlesource.com/16270
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp index 91346dae2a..3770e98d86 100644 --- a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp +++ b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp @@ -73,14 +73,20 @@ TEST_F(CPDFSecurityHandlerEmbeddertest, PasswordAfterGenerateSave) { file_access.m_GetBlock = GetBlockFromString; file_access.m_Param = &new_file; EXPECT_FALSE(FPDF_LoadCustomDocument(&file_access, nullptr)); + struct { const char* password; const unsigned long permissions; } tests[] = {{"1234", 0xFFFFF2C0}, {"5678", 0xFFFFFFFC}}; + for (const auto& test : tests) { - TestSaved(612, 792, md5, test.password); + OpenSavedDocument(test.password); + LoadSavedPage(); + VerifySavedRendering(612, 792, md5); EXPECT_EQ(test.permissions, FPDF_GetDocPermissions(m_SavedDocument)); - CloseSaved(); + + CloseSavedPage(); + CloseSavedDocument(); } } |