AX: [ATK] Convert the get_{string,text}_at_offset atktest.c unit tests to layout...
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Dec 2013 18:40:09 +0000 (18:40 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Dec 2013 18:40:09 +0000 (18:40 +0000)
commit0e1d099872c5a9ca7b5116703afc73db43e50994
treebb6c697d8a6958bb3f5a20973867c6f3eebbe5a2
parenta850a6daba578483dad0f0d6ca5b0c5e30279ac5
AX: [ATK] Convert the get_{string,text}_at_offset atktest.c unit tests to layout tests
https://bugs.webkit.org/show_bug.cgi?id=125451

Reviewed by Mario Sanchez Prada.

Source/WebKit/gtk:

* tests/testatk.c: Remove the tests which now exist as layout tests. Note that the
tests for atk_text_get_text_{before,after}_offset were removed without equivalents
added to the layout tests. The same is true for the END AtkTextBoundary types. Both
have been deprecated in ATK and are not being used by AT-SPI2 assistive technologies.
(testGetTextFunction):
(main):

Tools:

Create the needed callbacks for DRT and WKTR.

* DumpRenderTree/AccessibilityUIElement.cpp:
(characterAtOffsetCallback): added
(wordAtOffsetCallback): added
(lineAtOffsetCallback): added
(sentenceAtOffsetCallback): added
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(stringAtOffset): added
(AccessibilityUIElement::characterAtOffset): added
(AccessibilityUIElement::wordAtOffset): added
(AccessibilityUIElement::lineAtOffset): added
(AccessibilityUIElement::sentenceAtOffset): added
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::characterAtOffset): added
(WTR::AccessibilityUIElement::wordAtOffset): added
(WTR::AccessibilityUIElement::lineAtOffset): added
(WTR::AccessibilityUIElement::sentenceAtOffset): added
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::stringAtOffset): added
(WTR::AccessibilityUIElement::characterAtOffset): added
(WTR::AccessibilityUIElement::wordAtOffset): added
(WTR::AccessibilityUIElement::lineAtOffset): added
(WTR::AccessibilityUIElement::sentenceAtOffset): added

LayoutTests:

New tests and expectations based on the tests and expectations found in atktest.c.
These were done as platform-specific tests because only ATK-based assistive technologies
seem to have any need for this support.

* platform/gtk/accessibility/text-at-offset-embedded-objects-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-embedded-objects.html: Added.
* platform/gtk/accessibility/text-at-offset-newlines-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-newlines.html: Added.
* platform/gtk/accessibility/text-at-offset-preformatted-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-preformatted.html: Added.
* platform/gtk/accessibility/text-at-offset-simple-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-simple.html: Added.
* platform/gtk/accessibility/text-at-offset-special-chars-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-special-chars.html: Added.
* platform/gtk/accessibility/text-at-offset-textarea-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-textarea.html: Added.
* platform/gtk/accessibility/text-at-offset-textinput-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-textinput.html: Added.
* platform/gtk/accessibility/text-at-offset-wrapped-lines-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-wrapped-lines.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/accessibility/text-at-offset-embedded-objects-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-embedded-objects.html [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-newlines-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-newlines.html [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-preformatted-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-preformatted.html [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-simple-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-simple.html [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-special-chars-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-special-chars.html [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-textarea-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-textarea.html [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-textinput-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-textinput.html [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-wrapped-lines-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/text-at-offset-wrapped-lines.html [new file with mode: 0644]
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/tests/testatk.c
Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityUIElement.cpp
Tools/DumpRenderTree/AccessibilityUIElement.h
Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp