From 170656e36b45ea05662621a0070c985050071c7c Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 30 May 2018 18:42:21 +0000 Subject: Add pixel tests for PDFs that use generation numbers. This checks in 2 identical looking PDFs. They both started out as hello_world.pdf. They were then hand edited in different ways that results in the same final rendering output. Change-Id: Ib3b634a5119c0f2e4beb36844c3f2b8d58ab8a21 Reviewed-on: https://pdfium-review.googlesource.com/33232 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- testing/resources/pixel/generation_numbers1.pdf | 133 +++++++++++++++++++ .../pixel/generation_numbers1_expected.pdf.0.png | Bin 0 -> 1537 bytes .../generation_numbers1_expected_mac.pdf.0.png | Bin 0 -> 2375 bytes testing/resources/pixel/generation_numbers2.pdf | 147 +++++++++++++++++++++ .../pixel/generation_numbers2_expected.pdf.0.png | Bin 0 -> 1537 bytes .../generation_numbers2_expected_mac.pdf.0.png | Bin 0 -> 2375 bytes 6 files changed, 280 insertions(+) create mode 100644 testing/resources/pixel/generation_numbers1.pdf create mode 100644 testing/resources/pixel/generation_numbers1_expected.pdf.0.png create mode 100644 testing/resources/pixel/generation_numbers1_expected_mac.pdf.0.png create mode 100644 testing/resources/pixel/generation_numbers2.pdf create mode 100644 testing/resources/pixel/generation_numbers2_expected.pdf.0.png create mode 100644 testing/resources/pixel/generation_numbers2_expected_mac.pdf.0.png diff --git a/testing/resources/pixel/generation_numbers1.pdf b/testing/resources/pixel/generation_numbers1.pdf new file mode 100644 index 0000000000..2f63f041b7 --- /dev/null +++ b/testing/resources/pixel/generation_numbers1.pdf @@ -0,0 +1,133 @@ +%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 + /Resources << + /Font << + /F1 4 0 R + /F2 5 0 R + >> + >> + /Contents 6 0 R +>> +endobj +4 0 obj << + /Type /Font + /Subtype /Type1 + /BaseFont /Times-Roman +>> +endobj +5 0 obj << + /Type /Font + /Subtype /Type1 + /BaseFont /Helvetica +>> +endobj +6 0 obj << + /Length 83 +>> +stream +BT +20 50 Td +/F1 12 Tf +(Hello, world!) Tj +0 50 Td +/F2 16 Tf +(Goodbye, world!) Tj +ET +endstream +endobj +xref +0 7 +0000000000 65535 f +0000000015 00000 n +0000000068 00000 n +0000000161 00000 n +0000000303 00000 n +0000000381 00000 n +0000000457 00000 n +trailer << + /Root 1 0 R + /Size 7 +>> +startxref +591 +%%EOF +3 0 obj << + /Type /Page + /Parent 2 0 R +>> +endobj +xref +0 7 +0000000006 65535 f +0000000015 00000 n +0000000068 00000 n +0000000798 00000 n +0000000303 00000 n +0000000381 00000 n +0000000000 00001 f +trailer << + /Root 1 0 R + /Size 7 + /Prev 591 +>> +startxref +849 +%%EOF +3 0 obj << + /Type /Page + /Parent 2 0 R + /Resources << + /Font << + /F1 4 0 R + /F2 5 0 R + >> + >> + /Contents 6 1 R +>> +endobj +6 1 obj << + /Length 83 +>> +stream +BT +20 50 Td +/F1 12 Tf +(Goodbye, world!) Tj +0 50 Td +/F2 16 Tf +(Hello, world!) Tj +ET +endstream +endobj +xref +0 7 +0000000000 65535 f +0000000015 00000 n +0000000068 00000 n +0000001068 00000 n +0000000303 00000 n +0000000381 00000 n +0000001210 00001 n +trailer << + /Root 1 0 R + /Size 7 + /Prev 849 +>> +startxref +1344 +%%EOF diff --git a/testing/resources/pixel/generation_numbers1_expected.pdf.0.png b/testing/resources/pixel/generation_numbers1_expected.pdf.0.png new file mode 100644 index 0000000000..f2d3ba9038 Binary files /dev/null and b/testing/resources/pixel/generation_numbers1_expected.pdf.0.png differ diff --git a/testing/resources/pixel/generation_numbers1_expected_mac.pdf.0.png b/testing/resources/pixel/generation_numbers1_expected_mac.pdf.0.png new file mode 100644 index 0000000000..8d973acbd6 Binary files /dev/null and b/testing/resources/pixel/generation_numbers1_expected_mac.pdf.0.png differ diff --git a/testing/resources/pixel/generation_numbers2.pdf b/testing/resources/pixel/generation_numbers2.pdf new file mode 100644 index 0000000000..9ad64a8515 --- /dev/null +++ b/testing/resources/pixel/generation_numbers2.pdf @@ -0,0 +1,147 @@ +%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 + /Resources << + /Font << + /F1 4 0 R + /F2 5 0 R + >> + >> + /Contents 6 0 R +>> +endobj +4 0 obj << + /Type /Font + /Subtype /Type1 + /BaseFont /Times-Roman +>> +endobj +5 0 obj << + /Type /Font + /Subtype /Type1 + /BaseFont /Helvetica +>> +endobj +6 0 obj << + /Length 83 +>> +stream +BT +20 50 Td +/F1 12 Tf +(Hello, world!) Tj +0 50 Td +/F2 16 Tf +(Goodbye, world!) Tj +ET +endstream +endobj +xref +0 7 +0000000000 65535 f +0000000015 00000 n +0000000068 00000 n +0000000161 00000 n +0000000303 00000 n +0000000381 00000 n +0000000457 00000 n +trailer << + /Root 1 0 R + /Size 7 +>> +startxref +591 +%%EOF +2 0 obj << + /Type /Pages + /MediaBox [ 0 0 200 200 ] + /Count 2 + /Kids [ 7 0 R 7 0 R ] +>> +endobj +7 0 obj << + /Type /Page + /Parent 2 0 R +>> +endobj +xref +0 4 +0000000003 65535 f +0000000015 00000 n +0000000798 00000 n +0000000006 00001 f +6 2 +0000000000 00001 f +0000000897 00000 n +trailer << + /Root 1 0 R + /Size 8 + /Prev 591 +>> +startxref +948 +%%EOF +2 0 obj << + /Type /Pages + /MediaBox [ 0 0 200 200 ] + /Count 1 + /Kids [ 3 1 R ] +>> +endobj +3 1 obj << + /Type /Page + /Parent 2 0 R + /Resources << + /Font << + /F1 4 0 R + /F2 5 0 R + >> + >> + /Contents 6 1 R +>> +endobj +6 1 obj << + /Length 83 +>> +stream +BT +20 50 Td +/F1 12 Tf +(Goodbye, world!) Tj +0 50 Td +/F2 16 Tf +(Hello, world!) Tj +ET +endstream +endobj +xref +0 4 +0000000007 65535 f +0000000015 00000 n +0000001151 00000 n +0000001244 00001 n +6 2 +0000001386 00001 n +0000000000 00001 f +trailer << + /Root 1 0 R + /Size 8 + /Prev 948 +>> +startxref +1520 +%%EOF diff --git a/testing/resources/pixel/generation_numbers2_expected.pdf.0.png b/testing/resources/pixel/generation_numbers2_expected.pdf.0.png new file mode 100644 index 0000000000..f2d3ba9038 Binary files /dev/null and b/testing/resources/pixel/generation_numbers2_expected.pdf.0.png differ diff --git a/testing/resources/pixel/generation_numbers2_expected_mac.pdf.0.png b/testing/resources/pixel/generation_numbers2_expected_mac.pdf.0.png new file mode 100644 index 0000000000..8d973acbd6 Binary files /dev/null and b/testing/resources/pixel/generation_numbers2_expected_mac.pdf.0.png differ -- cgit v1.2.3