haikuwebkit/LayoutTests/accessibility/select-element-at-index-exp...

28 lines
968 B
Plaintext
Raw Permalink Normal View History

[ATK] Wrong selected element at a given index in a list box. https://bugs.webkit.org/show_bug.cgi?id=129039 Reviewed by Chris Fleizach. Source/WebCore: Test: accessibility/select-element-at-index.html The selected element at a given index was wrong. One should be considered among the all children of a list box, not only selected ones. * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp: (core): (listObjectForSelection): (optionFromList): (optionFromSelection): (webkitAccessibleSelectionRefSelection): Tools: Added missing implementation and proposed some new function for testing selection in a list boxes. * DumpRenderTree/AccessibilityUIElement.cpp: (setSelectedChildAtIndexCallback): (removeSelectionAtIndexCallback): (AccessibilityUIElement::getJSClass): * DumpRenderTree/AccessibilityUIElement.h: * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp: (AccessibilityUIElement::selectedChildrenCount): (AccessibilityUIElement::selectedChildAtIndex): (AccessibilityUIElement::setSelectedChildAtIndex): (AccessibilityUIElement::removeSelectionAtIndex): * DumpRenderTree/win/AccessibilityUIElementWin.cpp: (AccessibilityUIElement::selectedChildrenCount): (AccessibilityUIElement::selectedChildAtIndex): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::setSelectedChildAtIndex): (WTR::AccessibilityUIElement::removeSelectionAtIndex): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::selectedChildAtIndex): (WTR::AccessibilityUIElement::selectedChildrenCount): (WTR::AccessibilityUIElement::setSelectedChildAtIndex): (WTR::AccessibilityUIElement::removeSelectionAtIndex): LayoutTests: Proposed test that checks whether correct element at a given index is retrieved. Also testing some other scenarios such as removing selection from rows, counting all selected rows and setting selection. * accessibility/select-element-at-index-expected.txt: Added. * accessibility/select-element-at-index.html: Added. * platform/mac/TestExpectations: Skipping test in Mac, missing implementation. Canonical link: https://commits.webkit.org/147285@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-02-24 09:31:12 +00:00
Tests that checks whether setting selection at the given index works correctly
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS selectElement.selectedChildrenCount is 0
PASS selectElement.selectedChildrenCount is 1
PASS option1.isSelected is true
PASS selectElement.selectedChildAtIndex(0).isEqual(option1) is true
PASS selectElement.selectedChildrenCount is 2
PASS option2.isSelected is true
PASS selectElement.selectedChildAtIndex(1).isEqual(option2) is true
PASS option3.isSelected is false
PASS selectElement.selectedChildrenCount is 3
PASS option4.isSelected is true
AX: [ATK] Wrong selected element at a given index in a list box (redux) https://bugs.webkit.org/show_bug.cgi?id=164430 Reviewed by Darin Adler. Source/WebCore: This essentially undoes the implementation change resulting from r164577. As stated in the ATK documentation, atk_selection_ref_selection() takes "a gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child)." r164577 deliberately modified that, causing atk_selection_ref_selection() to treat the index as if it were the position with respect to all of the children. There is different API in ATK, namely atk_object_ref_accessible_child(), when the ith child from the set of all children is sought. Tests: accessibility/aria-listbox-no-selection.html accessibility/native-listbox-no-selection.html * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp: (optionFromSelection): LayoutTests: Add tests to ensure listboxes with no selected children do not report a selected child. Modify select-element-at-index.html to reflect the corrected behavior for ATK. Move the Mac port's expectations to the shared expectations. * accessibility/aria-listbox-no-selection-expected.txt: Added. * accessibility/aria-listbox-no-selection.html: Added. * accessibility/native-listbox-no-selection-expected.txt: Added. * accessibility/native-listbox-no-selection.html: Added. * accessibility/select-element-at-index-expected.txt: Modified. * accessibility/select-element-at-index.html: Modified. * platform/mac/accessibility/select-element-at-index-expected.txt: Removed. Canonical link: https://commits.webkit.org/182174@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-09 18:25:42 +00:00
PASS selectElement.selectedChildAtIndex(2).isEqual(option4) is true
[ATK] Wrong selected element at a given index in a list box. https://bugs.webkit.org/show_bug.cgi?id=129039 Reviewed by Chris Fleizach. Source/WebCore: Test: accessibility/select-element-at-index.html The selected element at a given index was wrong. One should be considered among the all children of a list box, not only selected ones. * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp: (core): (listObjectForSelection): (optionFromList): (optionFromSelection): (webkitAccessibleSelectionRefSelection): Tools: Added missing implementation and proposed some new function for testing selection in a list boxes. * DumpRenderTree/AccessibilityUIElement.cpp: (setSelectedChildAtIndexCallback): (removeSelectionAtIndexCallback): (AccessibilityUIElement::getJSClass): * DumpRenderTree/AccessibilityUIElement.h: * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp: (AccessibilityUIElement::selectedChildrenCount): (AccessibilityUIElement::selectedChildAtIndex): (AccessibilityUIElement::setSelectedChildAtIndex): (AccessibilityUIElement::removeSelectionAtIndex): * DumpRenderTree/win/AccessibilityUIElementWin.cpp: (AccessibilityUIElement::selectedChildrenCount): (AccessibilityUIElement::selectedChildAtIndex): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::setSelectedChildAtIndex): (WTR::AccessibilityUIElement::removeSelectionAtIndex): * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::selectedChildAtIndex): (WTR::AccessibilityUIElement::selectedChildrenCount): (WTR::AccessibilityUIElement::setSelectedChildAtIndex): (WTR::AccessibilityUIElement::removeSelectionAtIndex): LayoutTests: Proposed test that checks whether correct element at a given index is retrieved. Also testing some other scenarios such as removing selection from rows, counting all selected rows and setting selection. * accessibility/select-element-at-index-expected.txt: Added. * accessibility/select-element-at-index.html: Added. * platform/mac/TestExpectations: Skipping test in Mac, missing implementation. Canonical link: https://commits.webkit.org/147285@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-02-24 09:31:12 +00:00
PASS option4.isSelected is false
PASS selectElement.selectedChildrenCount is 2
PASS option2.isSelected is false
PASS selectElement.selectedChildrenCount is 1
PASS option1.isSelected is false
PASS selectElement.selectedChildrenCount is 0
PASS successfullyParsed is true
TEST COMPLETE