haikuwebkit/LayoutTests/accessibility/paragraph-with-linebreaks-e...

24 lines
909 B
Plaintext
Raw Permalink Normal View History

[GTK] Test /webkit/atk/getTextInParagraphAndBodyModerate fails https://bugs.webkit.org/show_bug.cgi?id=105538 Reviewed by Chris Fleizach. Source/WebCore: Expose '\n' for linebreaks when they were explicitly set by the author of the web content with a <br> tag. Tests: accessibility/paragraph-with-linebreaks.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::shouldAddSpaceBeforeAppendingNextElement): Helper function to decide when to append spaces when building the text under an element, considering line breaks. (WebCore::AccessibilityNodeObject::textUnderElement): Use the shouldAddSpaceBeforeAppendingNextElement() function here. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::textUnderElement): Return the renderer's text for accessibility objects exposing <br> elements. * html/parser/HTMLParserIdioms.h: (WebCore::isHTMLSpaceButNotLineBreak): New helper function, useful to be passed to other functions like simplifyWhiteSpace(). Tools: Unskip passing test getTextInParagraphAndBodyModerate. * Scripts/run-gtk-tests: (TestRunner): Unskip pasing test. LayoutTests: Added new Layout test and platform specific expectations. * platform/efl/accessibility/paragraph-with-linebreaks-expected.txt: Added. * platform/gtk/accessibility/paragraph-with-linebreaks-expected.txt: Added. * accessibility/paragraph-with-linebreaks.html: Added. Canonical link: https://commits.webkit.org/139000@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-10 08:52:07 +00:00
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Aliquam faucibus diam sit amet nunc vestibulum auctor.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam faucibus diam sit amet nunc vestibulum auctor.
This test checks that linebreaks explicitly set by the author are properly exposed to ATs.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Role of the paragraph with break lines: AXRole: AXParagraph
Value of the paragraph with break lines: AXValue: Lorem ipsum dolor sit amet,<\n>consectetur adipiscing elit.<\n>Aliquam faucibus diam sit amet nunc vestibulum auctor.
Role of the paragraph with wrapped lines: AXRole: AXParagraph
Value of the paragraph with wrapped lines: AXValue: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam faucibus diam sit amet nunc vestibulum auctor.
PASS successfullyParsed is true
TEST COMPLETE