| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "testing/embedder_test.h" | 5 #include "testing/embedder_test.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 | 7 |
| 8 class CPDFSecurityHandlerEmbeddertest : public EmbedderTest {}; | 8 class CPDFSecurityHandlerEmbeddertest : public EmbedderTest {}; |
| 9 | 9 |
| 10 TEST_F(CPDFSecurityHandlerEmbeddertest, Unencrypted) { | 10 TEST_F(CPDFSecurityHandlerEmbeddertest, Unencrypted) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 TEST_F(CPDFSecurityHandlerEmbeddertest, UserPassword) { | 24 TEST_F(CPDFSecurityHandlerEmbeddertest, UserPassword) { |
| 25 ASSERT_TRUE(OpenDocument("encrypted.pdf", "1234")); | 25 ASSERT_TRUE(OpenDocument("encrypted.pdf", "1234")); |
| 26 EXPECT_EQ(0xFFFFF2C0, FPDF_GetDocPermissions(document())); | 26 EXPECT_EQ(0xFFFFF2C0, FPDF_GetDocPermissions(document())); |
| 27 } | 27 } |
| 28 | 28 |
| 29 TEST_F(CPDFSecurityHandlerEmbeddertest, OwnerPassword) { | 29 TEST_F(CPDFSecurityHandlerEmbeddertest, OwnerPassword) { |
| 30 ASSERT_TRUE(OpenDocument("encrypted.pdf", "5678")); | 30 ASSERT_TRUE(OpenDocument("encrypted.pdf", "5678")); |
| 31 EXPECT_EQ(0xFFFFFFFC, FPDF_GetDocPermissions(document())); | 31 EXPECT_EQ(0xFFFFFFFC, FPDF_GetDocPermissions(document())); |
| 32 } | 32 } |
| OLD | NEW |