summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-02-06 16:06:49 -0800
committerTom Sepez <tsepez@chromium.org>2015-02-06 16:06:49 -0800
commit77bf6474c50948b1732852bfe0d365d0eaa4c7fd (patch)
treedb9e4b9aae9b3af1bdfb237806d6c4e03129ee83 /testing
parent23b4e3f4b6859d80f1e4a840fd7a7dce0cf8526b (diff)
downloadpdfium-77bf6474c50948b1732852bfe0d365d0eaa4c7fd.tar.xz
Add first pixel diffing test.
This is just a simple example of font scaling, so we have some bits to diff against. I've added a /pixel directory to separate these from the embeddertest resources. BUG=https://code.google.com/p/pdfium/issues/detail?id=62 R=jam@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/904983002
Diffstat (limited to 'testing')
-rw-r--r--testing/resources/pixel/font_size.in62
-rw-r--r--testing/resources/pixel/font_size.pdf72
-rw-r--r--testing/resources/pixel/font_size_expected.pdf.0.pngbin0 -> 12153 bytes
3 files changed, 134 insertions, 0 deletions
diff --git a/testing/resources/pixel/font_size.in b/testing/resources/pixel/font_size.in
new file mode 100644
index 0000000000..c4e21e2358
--- /dev/null
+++ b/testing/resources/pixel/font_size.in
@@ -0,0 +1,62 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+{{object 2 0}} <<
+ /Type /Pages
+ /MediaBox [ 0 0 100 400 ]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+{{object 3 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <<
+ /F1 4 0 R
+ >>
+ >>
+ /Contents 6 0 R
+>>
+endobj
+{{object 4 0}} <<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Times-Roman
+>>
+endobj
+{{object 6 0}} <<
+>>
+stream
+BT
+20 0 Td
+0 20 Td /F1 0 Tf (Size 0) Tj
+0 20 Td /F1 1 Tf (Size 1) Tj
+0 20 Td /F1 2 Tf (Size 2) Tj
+0 20 Td /F1 3 Tf (Size 3) Tj
+0 20 Td /F1 4 Tf (Size 4) Tj
+0 20 Td /F1 5 Tf (Size 5) Tj
+0 20 Td /F1 6 Tf (Size 6) Tj
+0 20 Td /F1 7 Tf (Size 7) Tj
+0 20 Td /F1 8 Tf (Size 8) Tj
+0 20 Td /F1 9 Tf (Size 9) Tj
+0 20 Td /F1 10 Tf (Size 10) Tj
+0 20 Td /F1 11 Tf (Size 11) Tj
+0 20 Td /F1 12 Tf (Size 12) Tj
+0 20 Td /F1 13 Tf (Size 13) Tj
+0 20 Td /F1 14 Tf (Size 14) Tj
+0 20 Td /F1 15 Tf (Size 15) Tj
+0 20 Td /F1 16 Tf (Size 16) Tj
+0 20 Td /F1 17 Tf (Size 17) Tj
+0 20 Td /F1 18 Tf (Size 18) Tj
+ET
+endstream
+endobj
+{{xref}}
+trailer <<
+ /Root 1 0 R
+>>
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/font_size.pdf b/testing/resources/pixel/font_size.pdf
new file mode 100644
index 0000000000..e0b882b67a
--- /dev/null
+++ b/testing/resources/pixel/font_size.pdf
@@ -0,0 +1,72 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+>>
+2 0 obj <<
+ /Type /Pages
+ /MediaBox [ 0 0 100 400 ]
+ /Count 1
+ /Kids [ 3 0 R ]
+>>
+endobj
+3 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <<
+ /F1 4 0 R
+ >>
+ >>
+ /Contents 6 0 R
+>>
+endobj
+4 0 obj <<
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Times-Roman
+>>
+endobj
+6 0 obj <<
+>>
+stream
+BT
+20 0 Td
+0 20 Td /F1 0 Tf (Size 0) Tj
+0 20 Td /F1 1 Tf (Size 1) Tj
+0 20 Td /F1 2 Tf (Size 2) Tj
+0 20 Td /F1 3 Tf (Size 3) Tj
+0 20 Td /F1 4 Tf (Size 4) Tj
+0 20 Td /F1 5 Tf (Size 5) Tj
+0 20 Td /F1 6 Tf (Size 6) Tj
+0 20 Td /F1 7 Tf (Size 7) Tj
+0 20 Td /F1 8 Tf (Size 8) Tj
+0 20 Td /F1 9 Tf (Size 9) Tj
+0 20 Td /F1 10 Tf (Size 10) Tj
+0 20 Td /F1 11 Tf (Size 11) Tj
+0 20 Td /F1 12 Tf (Size 12) Tj
+0 20 Td /F1 13 Tf (Size 13) Tj
+0 20 Td /F1 14 Tf (Size 14) Tj
+0 20 Td /F1 15 Tf (Size 15) Tj
+0 20 Td /F1 16 Tf (Size 16) Tj
+0 20 Td /F1 17 Tf (Size 17) Tj
+0 20 Td /F1 18 Tf (Size 18) Tj
+ET
+endstream
+endobj
+xref
+0 7
+0000000000 65535 f
+0000000015 00000 n
+0000000061 00000 n
+0000000154 00000 n
+0000000280 00000 n
+0000000000 65535 f
+0000000358 00000 n
+trailer <<
+ /Root 1 0 R
+>>
+startxref
+979
+%%EOF
diff --git a/testing/resources/pixel/font_size_expected.pdf.0.png b/testing/resources/pixel/font_size_expected.pdf.0.png
new file mode 100644
index 0000000000..a14df36afe
--- /dev/null
+++ b/testing/resources/pixel/font_size_expected.pdf.0.png
Binary files differ