Commit 14de29a3 authored by Ankit Kumar 🌪️'s avatar Ankit Kumar 🌪️ Committed by Commit Bot

PDF Accessibility: Adding test for paragraphs and heading.

This CL adds a test for validating the paragraph and heading support in
PDF accessibility pipeline. A single PDF has been added which has a
heading and multiple paragraphs.

Bug: 981448
Change-Id: I40fe2b958e29fba2c8e0d98de254c438ad6ea248
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1723851Reviewed-by: default avatarKevin Babbitt <kbabbitt@microsoft.com>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Ankit Kumar 🌪️ <ankk@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#682167}
parent 95615797
......@@ -2358,3 +2358,8 @@ INSTANTIATE_TEST_SUITE_P(
IN_PROC_BROWSER_TEST_P(PDFExtensionAccessibilityTreeDumpTest, HelloWorld) {
RunPDFTest(FILE_PATH_LITERAL("hello-world.pdf"));
}
IN_PROC_BROWSER_TEST_P(PDFExtensionAccessibilityTreeDumpTest,
ParagraphsAndHeadingUntagged) {
RunPDFTest(FILE_PATH_LITERAL("paragraphs-and-heading-untagged.pdf"));
}
[embedded component]
++[panel]
++++[landmark] name='Page 1'
++++++[heading]
++++++++[text] name='Heading<newline>'
++++++[paragraph]
++++++++[text] name='This is a small pdf file:<newline>'
++++++[paragraph]
++++++++[text] name='Lorem Ipsum is simply dummy text of the printing and typesetting industry.<newline>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.<newline>'
++++++[paragraph]
++++++++[text] name='It has survived not only five centuries, but also the leap into electronic typesetting,<newline>remaining essentially unchanged. It was popularised in the 1960s with the release of<newline>Letraset sheets containing Lorem Ipsum passages, and more recently with desktop<newline>publishing software like Aldus PageMaker including versions of Lorem Ipsum.<newline>'
++++++[paragraph]
++++++++[text] name='Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots<newline>in a piece of classical Latin literature from 45 BC, making it over 2000 years old.'
embeddedObject
++group restriction=readOnly
++++region name='Page 1' restriction=readOnly
++++++heading hierarchicalLevel=2 restriction=readOnly
++++++++staticText name='Heading<newline>' restriction=readOnly
++++++++++inlineTextBox name='Heading<newline>' restriction=readOnly
++++++paragraph restriction=readOnly
++++++++staticText name='This is a small pdf file:<newline>' restriction=readOnly
++++++++++inlineTextBox name='This is a small pdf file:<newline>' restriction=readOnly
++++++paragraph restriction=readOnly
++++++++staticText name='Lorem Ipsum is simply dummy text of the printing and typesetting industry.<newline>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.<newline>' restriction=readOnly
++++++++++inlineTextBox name='Lorem Ipsum is simply dummy text of the printing and typesetting industry.<newline>' restriction=readOnly
++++++++++inlineTextBox name='Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.<newline>' restriction=readOnly
++++++paragraph restriction=readOnly
++++++++staticText name='It has survived not only five centuries, but also the leap into electronic typesetting,<newline>remaining essentially unchanged. It was popularised in the 1960s with the release of<newline>Letraset sheets containing Lorem Ipsum passages, and more recently with desktop<newline>publishing software like Aldus PageMaker including versions of Lorem Ipsum.<newline>' restriction=readOnly
++++++++++inlineTextBox name='It ' restriction=readOnly
++++++++++inlineTextBox name='has survived not only five centuries, but also the leap into electronic typesetting,<newline>' restriction=readOnly
++++++++++inlineTextBox name='remaining essentially unchanged. It was popularised in the 1960s with the release of<newline>' restriction=readOnly
++++++++++inlineTextBox name='Letraset sheets containing Lorem Ipsum passages, and more recently with desktop<newline>' restriction=readOnly
++++++++++inlineTextBox name='publishing software like Aldus PageMaker including versions of Lorem Ipsum.<newline>' restriction=readOnly
++++++paragraph restriction=readOnly
++++++++staticText name='Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots<newline>in a piece of classical Latin literature from 45 BC, making it over 2000 years old.' restriction=readOnly
++++++++++inlineTextBox name='Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots<newline>' restriction=readOnly
++++++++++inlineTextBox name='in a piece of classical Latin literature from 45 BC, making it over 2000 years old.' restriction=readOnly
AXGroup AXDescription='Page 1'
++AXGroup
++++AXGroup AXDescription='Page 1'
++++++AXHeading AXValue='2'
++++++++AXStaticText AXValue='Heading<newline>'
++++++AXGroup
++++++++AXStaticText AXValue='This is a small pdf file:<newline>'
++++++AXGroup
++++++++AXStaticText AXValue='Lorem Ipsum is simply dummy text of the printing and typesetting industry.<newline>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.<newline>'
++++++AXGroup
++++++++AXStaticText AXValue='It has survived not only five centuries, but also the leap into electronic typesetting,<newline>remaining essentially unchanged. It was popularised in the 1960s with the release of<newline>Letraset sheets containing Lorem Ipsum passages, and more recently with desktop<newline>publishing software like Aldus PageMaker including versions of Lorem Ipsum.<newline>'
++++++AXGroup
++++++++AXStaticText AXValue='Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots<newline>in a piece of classical Latin literature from 45 BC, making it over 2000 years old.'
group
++group
++++region Name='Page 1'
++++++heading
++++++group
++++++group
++++++group
++++++group
ROLE_SYSTEM_GROUPING FOCUSABLE
++ROLE_SYSTEM_GROUPING READONLY
++++IA2_ROLE_LANDMARK name='Page 1' READONLY
++++++IA2_ROLE_HEADING READONLY
++++++++ROLE_SYSTEM_STATICTEXT name='Heading<newline>' READONLY
++++++IA2_ROLE_PARAGRAPH READONLY
++++++++ROLE_SYSTEM_STATICTEXT name='This is a small pdf file:<newline>' READONLY
++++++IA2_ROLE_PARAGRAPH READONLY
++++++++ROLE_SYSTEM_STATICTEXT name='Lorem Ipsum is simply dummy text of the printing and typesetting industry.<newline>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.<newline>' READONLY
++++++IA2_ROLE_PARAGRAPH READONLY
++++++++ROLE_SYSTEM_STATICTEXT name='It has survived not only five centuries, but also the leap into electronic typesetting,<newline>remaining essentially unchanged. It was popularised in the 1960s with the release of<newline>Letraset sheets containing Lorem Ipsum passages, and more recently with desktop<newline>publishing software like Aldus PageMaker including versions of Lorem Ipsum.<newline>' READONLY
++++++IA2_ROLE_PARAGRAPH READONLY
++++++++ROLE_SYSTEM_STATICTEXT name='Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots<newline>in a piece of classical Latin literature from 45 BC, making it over 2000 years old.' READONLY
{{header}}
{{object 1 0}} <<
/Type /Catalog
/Pages 2 0 R
>>
endobj
{{object 2 0}} <<
/Type /Pages
/Count 1
/Kids [3 0 R]
>>
endobj
% Page number 0
{{object 3 0}} <<
/Type /Page
/Parent 2 0 R
/Contents 4 0 R
/Resources <<
/Font <<
/F1 5 0 R
>>
/ProcSet [/PDF /Text]
>>
/MediaBox [0 0 612 792]
>>
endobj
{{object 4 0}} <<
{{streamlen}}
>>
stream
2 J
BT
0 0 0 rg
/F1 0027 Tf
69 723 Td
(Heading) Tj
ET
BT
/F1 0010 Tf
69 688 Td
(This is a small pdf file:) Tj
ET
BT
/F1 0010 Tf
69 664 Td
(Lorem Ipsum is simply dummy text of the printing and typesetting industry.) Tj
ET
BT
/F1 0010 Tf
69 652 Td
(Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.) Tj
ET
BT
/F1 0010 Tf
69 628 Td
(It has survived not only five centuries, but also the leap into electronic typesetting,) Tj
ET
BT
/F1 0010 Tf
69 616 Td
(remaining essentially unchanged. It was popularised in the 1960s with the release of) Tj
ET
BT
/F1 0010 Tf
69 604 Td
(Letraset sheets containing Lorem Ipsum passages, and more recently with desktop) Tj
ET
BT
/F1 0010 Tf
69 592 Td
(publishing software like Aldus PageMaker including versions of Lorem Ipsum.) Tj
ET
BT
/F1 0010 Tf
69 569 Td
(Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots) Tj
ET
BT
/F1 0010 Tf
69 557 Td
(in a piece of classical Latin literature from 45 BC, making it over 2000 years old.) Tj
ET
endstream
endobj
{{object 5 0}} <<
/Type /Font
/SubType /Type1
/Name /F1
/BaseFont /Helvetica
/Encoding /WinAnsiEncoding
>>
endobj
{{xref}}
{{trailer}}
{{startxref}}
%EOF
\ No newline at end of file
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment