Make a set of CPDFSecurityHandlerEmbedderTests more consistent.

Always check the FPDF_GetSecurityHandlerRevision() output in the tests
that open encrypted_hello_world_r?.pdf.

Change-Id: Ie581ad78d1de493cccbb43da39253e674ebd5077
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/63771
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
index 796fd1c..169fa4f 100644
--- a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
+++ b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
@@ -143,6 +143,7 @@
   // password as UTF-8 works.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r2.pdf", kAgeUTF8));
+  EXPECT_EQ(2, FPDF_GetSecurityHandlerRevision(document()));
 }
 
 TEST_F(CPDFSecurityHandlerEmbedderTest, OwnerPasswordVersion2Latin1) {
@@ -156,6 +157,7 @@
   // Same as OwnerPasswordVersion2UTF8 test above.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r3.pdf", kAgeUTF8));
+  EXPECT_EQ(3, FPDF_GetSecurityHandlerRevision(document()));
 }
 
 TEST_F(CPDFSecurityHandlerEmbedderTest, OwnerPasswordVersion3Latin1) {
@@ -176,6 +178,7 @@
   // Same as OwnerPasswordVersion2Latin1 test above.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r5.pdf", kAgeLatin1));
+  EXPECT_EQ(5, FPDF_GetSecurityHandlerRevision(document()));
 }
 
 TEST_F(CPDFSecurityHandlerEmbedderTest, OwnerPasswordVersion6UTF8) {
@@ -189,6 +192,7 @@
   // Same as OwnerPasswordVersion2Latin1 test above.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r6.pdf", kAgeLatin1));
+  EXPECT_EQ(6, FPDF_GetSecurityHandlerRevision(document()));
 }
 
 TEST_F(CPDFSecurityHandlerEmbedderTest, UserPasswordVersion2UTF8) {
@@ -196,6 +200,7 @@
   // password as UTF-8 works.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r2.pdf", kHotelUTF8));
+  EXPECT_EQ(2, FPDF_GetSecurityHandlerRevision(document()));
 }
 
 TEST_F(CPDFSecurityHandlerEmbedderTest, UserPasswordVersion2Latin1) {
@@ -209,6 +214,7 @@
   // Same as UserPasswordVersion2UTF8 test above.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r3.pdf", kHotelUTF8));
+  EXPECT_EQ(3, FPDF_GetSecurityHandlerRevision(document()));
 }
 
 TEST_F(CPDFSecurityHandlerEmbedderTest, UserPasswordVersion3Latin1) {
@@ -229,6 +235,7 @@
   // Same as UserPasswordVersion2Latin1 test above.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r5.pdf", kHotelLatin1));
+  EXPECT_EQ(5, FPDF_GetSecurityHandlerRevision(document()));
 }
 
 TEST_F(CPDFSecurityHandlerEmbedderTest, UserPasswordVersion6UTF8) {
@@ -242,4 +249,5 @@
   // Same as UserPasswordVersion2Latin1 test above.
   ASSERT_TRUE(
       OpenDocumentWithPassword("encrypted_hello_world_r6.pdf", kHotelLatin1));
+  EXPECT_EQ(6, FPDF_GetSecurityHandlerRevision(document()));
 }