Rename link_annots.pdf to annots.pdf and add a widget annotation.

Since link_annots.pdf actually has links, highlights, and popups, rename
it to annots.pdf to reflect its contents. Since it contains several
annotation types already, add a widget annotation to give it even more
variety. The widget annotation will be used in a follow-up CL for
testing.

Change-Id: Icc0915467755bf00b1eda3e67b553f6ac229412e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68550
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_text_embeddertest.cpp b/fpdfsdk/fpdf_text_embeddertest.cpp
index b85977a..77f015a 100644
--- a/fpdfsdk/fpdf_text_embeddertest.cpp
+++ b/fpdfsdk/fpdf_text_embeddertest.cpp
@@ -772,13 +772,13 @@
 }
 
 TEST_F(FPDFTextEmbedderTest, AnnotLinks) {
-  ASSERT_TRUE(OpenDocument("link_annots.pdf"));
+  ASSERT_TRUE(OpenDocument("annots.pdf"));
   FPDF_PAGE page = LoadPage(0);
   ASSERT_TRUE(page);
 
   // Get link count via checking annotation subtype
   int annot_count = FPDFPage_GetAnnotCount(page);
-  ASSERT_EQ(8, annot_count);
+  ASSERT_EQ(9, annot_count);
   int annot_subtype_link_count = 0;
   for (int i = 0; i < annot_count; ++i) {
     ScopedFPDFAnnotation annot(FPDFPage_GetAnnot(page, i));
diff --git a/testing/resources/link_annots.in b/testing/resources/annots.in
similarity index 92%
rename from testing/resources/link_annots.in
rename to testing/resources/annots.in
index 076069c..c68bd78 100644
--- a/testing/resources/link_annots.in
+++ b/testing/resources/annots.in
@@ -2,6 +2,14 @@
 {{object 1 0}} <<
   /Type /Catalog
   /Pages 2 0 R
+  /AcroForm <<
+    /Fields [23 0 R]
+    /DR <<
+      /Font <<
+        /F1 7 0 R
+      >>
+    >>
+  >>
 >>
 endobj
 {{object 2 0}} <<
@@ -17,7 +25,7 @@
     >>
     /ProcSet [/PDF /Text /ImageC]
     /ExtGState <<
-      /GS0 23 0 R
+      /GS0 24 0 R
     >>
   >>
 >>
@@ -26,7 +34,7 @@
   /Type /Page
   /Parent 2 0 R
   /Contents 5 0 R
-  /Annots [15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R]
+  /Annots [15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R]
 >>
 endobj
 {{object 4 0}} <<
@@ -102,7 +110,7 @@
       /Form0 10 0 R
     >>
     /ExtGState <<
-      /GS0 24 0 R
+      /GS0 25 0 R
     >>
   >>
 >>
@@ -141,7 +149,7 @@
       /Form0 12 0 R
     >>
     /ExtGState <<
-      /GS0 24 0 R
+      /GS0 25 0 R
     >>
   >>
 >>
@@ -180,7 +188,7 @@
       /Form0 14 0 R
     >>
     /ExtGState <<
-      /GS0 24 0 R
+      /GS0 25 0 R
     >>
   >>
 >>
@@ -313,13 +321,24 @@
 >>
 endobj
 {{object 23 0}} <<
+  /Type /Annot
+  /Subtype /Widget
+  /FT /Ch
+  /Ff 131072
+  /T (Combo1)
+  /DA (0 0 0 rg /F1 12 Tf)
+  /Rect [70 350 170 380]
+  /Opt [(Highlight) (Link) (Popup) (Widget)]
+>>
+endobj
+{{object 24 0}} <<
   /ca 1
   /Type /ExtGState
   /CA 1
   /BM /Normal
 >>
 endobj
-{{object 24 0}} <<
+{{object 25 0}} <<
   /ca 1
   /Type /ExtGState
   /CA 1
diff --git a/testing/resources/link_annots.pdf b/testing/resources/annots.pdf
similarity index 84%
rename from testing/resources/link_annots.pdf
rename to testing/resources/annots.pdf
index b964bf5..b514c7d 100644
--- a/testing/resources/link_annots.pdf
+++ b/testing/resources/annots.pdf
@@ -3,6 +3,14 @@
 1 0 obj <<
   /Type /Catalog
   /Pages 2 0 R
+  /AcroForm <<
+    /Fields [23 0 R]
+    /DR <<
+      /Font <<
+        /F1 7 0 R
+      >>
+    >>
+  >>
 >>
 endobj
 2 0 obj <<
@@ -18,7 +26,7 @@
     >>
     /ProcSet [/PDF /Text /ImageC]
     /ExtGState <<
-      /GS0 23 0 R
+      /GS0 24 0 R
     >>
   >>
 >>
@@ -27,7 +35,7 @@
   /Type /Page
   /Parent 2 0 R
   /Contents 5 0 R
-  /Annots [15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R]
+  /Annots [15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R]
 >>
 endobj
 4 0 obj <<
@@ -103,7 +111,7 @@
       /Form0 10 0 R
     >>
     /ExtGState <<
-      /GS0 24 0 R
+      /GS0 25 0 R
     >>
   >>
 >>
@@ -142,7 +150,7 @@
       /Form0 12 0 R
     >>
     /ExtGState <<
-      /GS0 24 0 R
+      /GS0 25 0 R
     >>
   >>
 >>
@@ -181,7 +189,7 @@
       /Form0 14 0 R
     >>
     /ExtGState <<
-      /GS0 24 0 R
+      /GS0 25 0 R
     >>
   >>
 >>
@@ -314,13 +322,24 @@
 >>
 endobj
 23 0 obj <<
+  /Type /Annot
+  /Subtype /Widget
+  /FT /Ch
+  /Ff 131072
+  /T (Combo1)
+  /DA (0 0 0 rg /F1 12 Tf)
+  /Rect [70 350 170 380]
+  /Opt [(Highlight) (Link) (Popup) (Widget)]
+>>
+endobj
+24 0 obj <<
   /ca 1
   /Type /ExtGState
   /CA 1
   /BM /Normal
 >>
 endobj
-24 0 obj <<
+25 0 obj <<
   /ca 1
   /Type /ExtGState
   /CA 1
@@ -329,36 +348,37 @@
 >>
 endobj
 xref
-0 25
+0 26
 0000000000 65535 f 
 0000000015 00000 n 
-0000000068 00000 n 
-0000000338 00000 n 
-0000000475 00000 n 
-0000000570 00000 n 
-0000001108 00000 n 
-0000001345 00000 n 
-0000001423 00000 n 
-0000001499 00000 n 
-0000001749 00000 n 
-0000001972 00000 n 
-0000002222 00000 n 
-0000002442 00000 n 
-0000002693 00000 n 
-0000002916 00000 n 
-0000003056 00000 n 
-0000003196 00000 n 
-0000003443 00000 n 
-0000003727 00000 n 
-0000003944 00000 n 
-0000004171 00000 n 
-0000004269 00000 n 
-0000004544 00000 n 
-0000004615 00000 n 
+0000000169 00000 n 
+0000000439 00000 n 
+0000000583 00000 n 
+0000000678 00000 n 
+0000001216 00000 n 
+0000001453 00000 n 
+0000001531 00000 n 
+0000001607 00000 n 
+0000001857 00000 n 
+0000002080 00000 n 
+0000002330 00000 n 
+0000002550 00000 n 
+0000002801 00000 n 
+0000003024 00000 n 
+0000003164 00000 n 
+0000003304 00000 n 
+0000003551 00000 n 
+0000003835 00000 n 
+0000004052 00000 n 
+0000004279 00000 n 
+0000004377 00000 n 
+0000004652 00000 n 
+0000004842 00000 n 
+0000004913 00000 n 
 trailer <<
   /Root 1 0 R
-  /Size 25
+  /Size 26
 >>
 startxref
-4701
+4999
 %%EOF