Add a test PDF with a filter-less thumbnail image.
Add a test PDF where the thumbnail image has no filters. Since the
content stream has a raw bitmap, deliberately make it:
a) Use only ASCII characters, so fixup_pdf_template.py does not mangle
it.
b) One long line, as CR/LF characters will be interpreted as pixel data.
The image is red on the top half and blue on the bottom half. It will be
used in https://pdfium-review.googlesource.com/55390
Bug: pdfium:1312
TBR=tsepez@chromium.org
Change-Id: I8336aa677f18c3a1fca501ac5ea2f60b4ecd38eb
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/56930
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/testing/resources/thumbnail_with_no_filters.in b/testing/resources/thumbnail_with_no_filters.in
new file mode 100644
index 0000000..188db2a
--- /dev/null
+++ b/testing/resources/thumbnail_with_no_filters.in
@@ -0,0 +1,41 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+{{object 2 0}} <<
+ /Type /Pages
+ /MediaBox [ 0 0 200 200 ]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+{{object 3 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Contents 4 0 R
+ /Thumb 5 0 R
+>>
+endobj
+{{object 4 0}} <<
+ {{streamlen}}
+>>
+stream
+endstream
+endobj
+{{object 5 0}} <<
+ /Width 10
+ /Height 10
+ /BitsPerComponent 8
+ /ColorSpace /DeviceRGB
+ {{streamlen}}
+>>
+stream
+z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
+endstream
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/thumbnail_with_no_filters.pdf b/testing/resources/thumbnail_with_no_filters.pdf
new file mode 100644
index 0000000..1dafe2a
--- /dev/null
+++ b/testing/resources/thumbnail_with_no_filters.pdf
@@ -0,0 +1,53 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+endobj
+2 0 obj <<
+ /Type /Pages
+ /MediaBox [ 0 0 200 200 ]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+3 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Contents 4 0 R
+ /Thumb 5 0 R
+>>
+endobj
+4 0 obj <<
+ /Length 0
+>>
+stream
+endstream
+endobj
+5 0 obj <<
+ /Width 10
+ /Height 10
+ /BitsPerComponent 8
+ /ColorSpace /DeviceRGB
+ /Length 301
+>>
+stream
+z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
+endstream
+endobj
+xref
+0 6
+0000000000 65535 f
+0000000015 00000 n
+0000000068 00000 n
+0000000161 00000 n
+0000000245 00000 n
+0000000295 00000 n
+trailer <<
+ /Root 1 0 R
+ /Size 6
+>>
+startxref
+720
+%%EOF