Add a test case for PDF edits not being parsed correctly
Simulate the issue in the bug by taking testing/resources/rectangles.pdf
and manually appending some edits. The rectangle colors have changed
from RGB to CMY, and the PDF page size has changed from 200x300 to
200x350. As-is, PDFium sees the color change, but not the page size
change, so this pixel test is marked as suppressed.
Bug: chromium:1484283
Change-Id: I8ded15ccb0173f6d4782693062cc4bb9d375fbfc
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/112851
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nigi <nigi@chromium.org>
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index 62ea49c..ccb6801 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -640,6 +640,9 @@
# TODO(pdfium:1457): Remove after associated bug is fixed
bug_1457.in * * * *
+# TODO(chromium:1484283): Remove after associated bug is fixed
+bug_1484283.pdf * * * *
+
# TODO(pdfium:1519): Remove after associated bug is fixed
bug_1519.in * * * *
diff --git a/testing/resources/pixel/bug_1484283.pdf b/testing/resources/pixel/bug_1484283.pdf
new file mode 100644
index 0000000..b29ac9b
--- /dev/null
+++ b/testing/resources/pixel/bug_1484283.pdf
@@ -0,0 +1,120 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+2 0 obj <<
+ /Type /Pages
+ /MediaBox [0 0 200 300]
+ /Count 1
+ /Kids [3 0 R]
+>>
+endobj
+3 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Contents 4 0 R
+>>
+endobj
+4 0 obj <<
+ /Length 188
+>>
+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
+0 5
+0000000000 65535 f
+0000000015 00000 n
+0000000068 00000 n
+0000000157 00000 n
+0000000226 00000 n
+trailer <<
+ /Root 1 0 R
+ /Size 5
+>>
+startxref
+466
+%%EOF
+4 0 obj <<
+ /Length 188
+>>
+stream
+q
+0 0 0 rg
+0 290 10 10 re B*
+10 150 50 30 re B*
+1 1 0 rg
+190 290 10 10 re B*
+70 232 50 30 re B*
+1 0 1 rg
+190 0 10 10 re B*
+130 150 50 30 re B*
+0 1 1 rg
+0 0 10 10 re B*
+70 67 50 30 re B*
+Q
+endstream
+endobj
+5 0 obj <<
+ /Type /ObjStm
+ /First 4
+ /Length 78
+ /N 1
+>>
+stream
+2 0 <<
+ /Type /Pages
+ /MediaBox [0 0 200 350]
+ /Count 1
+ /Kids [3 0 R]
+>>
+endstream
+endobj
+6 0 obj <<
+ /Type /XRef
+ /Filter /ASCIIHexDecode
+ /Index [2 1 4 3]
+ /Length 48
+ /Prev 466
+ /Root 1 0 R
+ /Size 7
+ /W [1 2 1]
+>>
+stream
+02 00 05 00
+01 02 79 00
+01 03 69 00
+01 04 0C 00
+endstream
+endobj
+xref
+4 3
+0000000633 00000 n
+0000000873 00000 n
+0000001036 00000 n
+trailer <<
+ /Prev 466
+ /Root 1 0 R
+ /Size 7
+ /XRefStm 1036
+>>
+startxref
+1243
+%%EOF
diff --git a/testing/resources/pixel/bug_1484283_expected.pdf.0.png b/testing/resources/pixel/bug_1484283_expected.pdf.0.png
new file mode 100644
index 0000000..2b2d724
--- /dev/null
+++ b/testing/resources/pixel/bug_1484283_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/bug_1484283_expected_skia.pdf.0.png b/testing/resources/pixel/bug_1484283_expected_skia.pdf.0.png
new file mode 100644
index 0000000..023239b
--- /dev/null
+++ b/testing/resources/pixel/bug_1484283_expected_skia.pdf.0.png
Binary files differ