Add a pixel test with many layers of form xobjects.

It should render the same way as testing/resources/rectangles.pdf, but
instead, it renders blank. Thus the test results are suppressed.

Bug: chromium:972999
Change-Id: I05b59c929f51655e7f584d2a19cbe7f94caf21dc
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74910
Reviewed-by: Hui Yingst <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index 6cd0fc7..f14aa19 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -331,6 +331,9 @@
 # TODO(pdfium:1461): Remove after associated bug is fixed
 bug_1402.in win * *
 
+# TODO(pdfium:1466): Remove after associated bug is fixed
+bug_1449.in linux * *
+
 # TODO(pdfium:1457): Remove after associated bug is fixed
 bug_1457.in * * *
 
@@ -346,8 +349,8 @@
 # TODO(chromium:451366): Remove after associated bug is fixed
 bug_451366.in * * *
 
-# TODO(pdfium:1466): Remove after associated bug is fixed
-bug_1449.in linux * *
+# TODO(chromium:972999): Remove after associated bug is fixed
+bug_972999.in * * *
 
 # TODO(chromium:1028991): Remove after associated bug is fixed
 reset_button.in * * *
diff --git a/testing/resources/pixel/bug_972999.in b/testing/resources/pixel/bug_972999.in
new file mode 100644
index 0000000..6e928da
--- /dev/null
+++ b/testing/resources/pixel/bug_972999.in
@@ -0,0 +1,603 @@
+{{header}}
+{{object 1 0}} <<
+  /Type /Catalog
+  /Pages 2 0 R
+>>
+endobj
+{{object 2 0}} <<
+  /Type /Pages
+  /Count 1
+  /Kids [3 0 R]
+>>
+endobj
+{{object 3 0}} <<
+  /Type /Page
+  /Parent 2 0 R
+  /Contents 4 0 R
+  /MediaBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 5 0 R
+    >>
+  >>
+>>
+endobj
+{{object 4 0}} <<
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 5 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 6 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 6 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 7 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 7 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 8 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 8 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 9 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 9 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 10 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 10 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 11 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 11 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 12 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 12 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 13 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 13 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 14 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 14 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 15 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 15 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 16 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 16 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 17 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 17 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 18 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 18 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 19 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 19 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 20 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 20 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 21 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 21 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 22 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 22 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 23 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 23 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 24 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 24 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 25 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 25 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 26 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 26 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 27 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 27 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 28 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 28 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 29 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 29 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 30 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 30 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 31 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 31 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 32 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 32 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 33 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 33 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 34 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 34 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 35 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 35 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 36 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 36 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 37 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 37 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 38 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 38 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  /Resources <<
+    /XObject <<
+      /X1 39 0 R
+    >>
+  >>
+  {{streamlen}}
+>>
+stream
+/X1 Do
+endstream
+endobj
+{{object 39 0}} <<
+  /Type /XObject
+  /Subtype /Form
+  /FormType 1
+  /BBox [0 0 200 300]
+  {{streamlen}}
+>>
+stream
+q
+0 0 0 rg
+0 290 10 10 re B*
+10 150 50 30 re B*
+0 0 1 rg
+190 290 10 10 re B*
+70 232 50 30 re B*
+0 1 0 rg
+190 0 10 10 re B*
+130 150 50 30 re B*
+1 0 0 rg
+0 0 10 10 re B*
+70 67 50 30 re B*
+Q
+endstream
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/bug_972999_expected.pdf.0.png b/testing/resources/pixel/bug_972999_expected.pdf.0.png
new file mode 100644
index 0000000..ee652fa
--- /dev/null
+++ b/testing/resources/pixel/bug_972999_expected.pdf.0.png
Binary files differ