summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-29 16:18:28 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-29 16:18:28 -0800
commit1bce5f62f3292a6baf35491bf4c9b4fde2fb73e3 (patch)
tree0367ce72d182d10ebf75413b728065c5e39fac1d /testing
parentb0b6373e685e0591fb47fe6cb90e767728241e7f (diff)
downloadpdfium-1bce5f62f3292a6baf35491bf4c9b4fde2fb73e3.tar.xz
Add tests for CBA_AnnotIterator.
I'm about to replace the sort() that underlies this class, so I first want to be sure I don't disrupt the order. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1652533002 .
Diffstat (limited to 'testing')
-rw-r--r--testing/resources/annotiter.in129
-rw-r--r--testing/resources/annotiter.pdf158
2 files changed, 287 insertions, 0 deletions
diff --git a/testing/resources/annotiter.in b/testing/resources/annotiter.in
new file mode 100644
index 0000000000..4dc2a4ee2e
--- /dev/null
+++ b/testing/resources/annotiter.in
@@ -0,0 +1,129 @@
+{{header}}
+{{object 1 0}} <<
+ /Type /Catalog
+ /Pages 2 0 R
+ /AcroForm 20 0 R
+>>
+endobj
+{{object 2 0}} <<
+ /Type /Pages
+ /Count 3
+ /Kids [
+ 10 0 R
+ 11 0 R
+ 12 0 R
+ ]
+>>
+endobj
+% Page number 0.
+{{object 10 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+ /Tabs /R
+>>
+endobj
+% Page number 1.
+{{object 11 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+ /Tabs /C
+>>
+endobj
+% Page number 2.
+{{object 12 0}} <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+ /Tabs /S
+>>
+endobj
+% Forms
+{{object 20 0}} <<
+ /Fields [21 0 R]
+>>
+endobj
+% Fields
+{{object 21 0}} <<
+ /T (MyField)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [100 100 500 500]
+ /Kids [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+>>
+endobj
+{{object 22 0}} <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_LeftBottom)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [200 200 220 220]
+>>
+endobj
+{{object 23 0}} <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_RightTop)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [401 401 421 421]
+>>
+endobj
+{{object 24 0}} <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_LeftTop)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [201 400 221 420]
+>>
+endobj
+{{object 25 0}} <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_RightBottom)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [400 201 420 221]
+>>
+endobj
+{{xref}}
+trailer <<
+ /Root 1 0 R
+>>
+{{startxref}}
+%%EOF
diff --git a/testing/resources/annotiter.pdf b/testing/resources/annotiter.pdf
new file mode 100644
index 0000000000..2cb6d395d0
--- /dev/null
+++ b/testing/resources/annotiter.pdf
@@ -0,0 +1,158 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+ /Type /Catalog
+ /Pages 2 0 R
+ /AcroForm 20 0 R
+>>
+endobj
+2 0 obj <<
+ /Type /Pages
+ /Count 3
+ /Kids [
+ 10 0 R
+ 11 0 R
+ 12 0 R
+ ]
+>>
+endobj
+% Page number 0.
+10 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+ /Tabs /R
+>>
+endobj
+% Page number 1.
+11 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+ /Tabs /C
+>>
+endobj
+% Page number 2.
+12 0 obj <<
+ /Type /Page
+ /Parent 2 0 R
+ /Resources <<
+ /Font <</F1 15 0 R>>
+ >>
+ /MediaBox [0 0 612 792]
+ /Annots [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+ /Tabs /S
+>>
+endobj
+% Forms
+20 0 obj <<
+ /Fields [21 0 R]
+>>
+endobj
+% Fields
+21 0 obj <<
+ /T (MyField)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [100 100 500 500]
+ /Kids [
+ 22 0 R
+ 23 0 R
+ 24 0 R
+ 25 0 R
+ ]
+>>
+endobj
+22 0 obj <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_LeftBottom)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [200 200 220 220]
+>>
+endobj
+23 0 obj <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_RightTop)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [401 401 421 421]
+>>
+endobj
+24 0 obj <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_LeftTop)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [201 400 221 420]
+>>
+endobj
+25 0 obj <<
+ /FT /Tx
+ /Parent 5 0 R
+ /T (Sub_RightBottom)
+ /Type /Annot
+ /Subtype /Widget
+ /Rect [400 201 420 221]
+>>
+endobj
+xref
+0 26
+0000000000 65535 f
+0000000015 00000 n
+0000000087 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000198 00000 n
+0000000410 00000 n
+0000000622 00000 n
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000000 65535 f
+0000000825 00000 n
+0000000875 00000 n
+0000001030 00000 n
+0000001160 00000 n
+0000001288 00000 n
+0000001415 00000 n
+trailer <<
+ /Root 1 0 R
+>>
+startxref
+1546
+%%EOF