Title: [153435] trunk
Revision
153435
Author
[email protected]
Date
2013-07-29 11:26:52 -0700 (Mon, 29 Jul 2013)

Log Message

[ATK] Implement attributesOfChildren() for AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118967

Reviewed by Gustavo Noronha Silva.

Tools:

Implemented AccessibilityUIElement::attributesOfChildren() both
in DumpRenderTree and the WebKitTestRunner.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::attributesOfChildren): Implemented.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributesOfChildren): Implemented.

LayoutTests:

Removed fixed tests from TestExpectations and added/updated expected
results for tests that are now dumping more useful information.

* platform/gtk/TestExpectations: Removed three fixed tests.
* platform/gtk/accessibility/image-map2-expected.txt: Updated.
* platform/gtk/accessibility/lists-expected.txt: Added.
* platform/gtk/accessibility/plugin-expected.txt: Added.
* platform/gtk/accessibility/table-with-aria-role-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (153434 => 153435)


--- trunk/LayoutTests/ChangeLog	2013-07-29 18:10:32 UTC (rev 153434)
+++ trunk/LayoutTests/ChangeLog	2013-07-29 18:26:52 UTC (rev 153435)
@@ -1,3 +1,19 @@
+2013-07-29  Mario Sanchez Prada  <[email protected]>
+
+        [ATK] Implement attributesOfChildren() for AccessibilityUIElement
+        https://bugs.webkit.org/show_bug.cgi?id=118967
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Removed fixed tests from TestExpectations and added/updated expected
+        results for tests that are now dumping more useful information.
+
+        * platform/gtk/TestExpectations: Removed three fixed tests.
+        * platform/gtk/accessibility/image-map2-expected.txt: Updated.
+        * platform/gtk/accessibility/lists-expected.txt: Added.
+        * platform/gtk/accessibility/plugin-expected.txt: Added.
+        * platform/gtk/accessibility/table-with-aria-role-expected.txt: Added.
+
 2013-07-29  Renata Hodovan  <[email protected]>
 
         ASSERT_NOT_REACHED was touched in WebCore::SVGAnimatedType::valueAsString

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (153434 => 153435)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-07-29 18:10:32 UTC (rev 153434)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-07-29 18:26:52 UTC (rev 153435)
@@ -79,8 +79,6 @@
 webkit.org/b/98348 accessibility/radio-button-group-members.html [ WontFix Missing ]
 webkit.org/b/98348 accessibility/table-attributes.html [ WontFix Missing ]
 webkit.org/b/98348 accessibility/table-sections.html [ WontFix Missing ]
-webkit.org/b/98348 accessibility/table-with-aria-role.html [ WontFix Missing ]
-webkit.org/b/98348 accessibility/plugin.html [ WontFix Missing ]
 
 # Feature disabled, see: https://bugs.webkit.org/show_bug.cgi?id=85425
 webkit.org/b/98925 fast/viewport/viewport-legacy-handheldfriendly.html [ Skip ]
@@ -864,9 +862,6 @@
 webkit.org/b/98380 accessibility/th-as-title-ui.html [ Failure ]
 webkit.org/b/98382 accessibility/visible-elements.html [ Failure ]
 
-# No platform-specific expectations available until we implement attributesOfChildren().
-webkit.org/b/118967 accessibility/lists.html [ Failure Missing ]
-
 # Blur and focus events are not received for the following tests.
 Bug(GTK) fast/events/blur-focus-window-should-blur-focus-element.html [ Failure ]
 Bug(GTK) fast/dom/HTMLDocument/hasFocus.html [ Failure ]

Modified: trunk/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt (153434 => 153435)


--- trunk/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt	2013-07-29 18:10:32 UTC (rev 153434)
+++ trunk/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt	2013-07-29 18:26:52 UTC (rev 153435)
@@ -1,5 +1,60 @@
 Image map - test 2 - 2 Links (alt tags)
 ----------------------
+AXRole: AXDiv
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 8.000000, 8.000000 }
+AXSize: { 784.000000, 34.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: Image map - test 2 - 2 Links (alt tags)<\n>----------------------<\n>
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: html-id:result, toolkit:WebKitGtk
+------------
+AXRole: AXLink
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 18.000000, 53.000000 }
+AXSize: { 123.000000, 62.000000 }
+AXTitle: 
+AXDescription: Link1
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXLink
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 20.000000, 117.000000 }
+AXSize: { 122.000000, 14.000000 }
+AXTitle: 
+AXDescription: Link2
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
 
 
  

Added: trunk/LayoutTests/platform/gtk/accessibility/lists-expected.txt (0 => 153435)


--- trunk/LayoutTests/platform/gtk/accessibility/lists-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/accessibility/lists-expected.txt	2013-07-29 18:26:52 UTC (rev 153435)
@@ -0,0 +1,304 @@
+test 1
+test 2
+test 1
+test 2
+term 1
+meaning 2
+term b
+meaning 1
+meaning 2
+
+
+
+
+AXRole: AXList
+AXParent: AXWebArea
+AXChildren: 2
+AXPosition: { 8.000000, 16.000000 }
+AXSize: { 784.000000, 34.000000 }
+AXTitle: 
+AXDescription: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXList
+AXParent: AXWebArea
+AXChildren: 2
+AXPosition: { 8.000000, 66.000000 }
+AXSize: { 784.000000, 34.000000 }
+AXTitle: 
+AXDescription: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXList
+AXParent: AXWebArea
+AXChildren: 5
+AXPosition: { 8.000000, 116.000000 }
+AXSize: { 784.000000, 85.000000 }
+AXTitle: 
+AXDescription: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXGroup
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 8.000000, 217.000000 }
+AXSize: { 784.000000, 51.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: <\n><\n><\n>
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXHorizontalRule
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 8.000000, 276.000000 }
+AXSize: { 784.000000, 2.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXGroup
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 8.000000, 286.000000 }
+AXSize: { 784.000000, 17.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: <\n>
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+
+
+AXRole: AXListItem
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 48.000000, 16.000000 }
+AXSize: { 729.000000, 17.000000 }
+AXTitle: test 1
+AXDescription: 
+AXValue: • test 1
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXListItem
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 48.000000, 33.000000 }
+AXSize: { 729.000000, 17.000000 }
+AXTitle: test 2
+AXDescription: 
+AXValue: • test 2
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+
+
+AXRole: AXListItem
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 48.000000, 66.000000 }
+AXSize: { 729.000000, 17.000000 }
+AXTitle: test 1
+AXDescription: 
+AXValue: 1. test 1
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXListItem
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 48.000000, 83.000000 }
+AXSize: { 729.000000, 17.000000 }
+AXTitle: test 2
+AXDescription: 
+AXValue: 2. test 2
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+
+
+AXRole: AXUnknown
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 8.000000, 116.000000 }
+AXSize: { 769.000000, 17.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: term 1
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXUnknown
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 48.000000, 133.000000 }
+AXSize: { 729.000000, 17.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: meaning 2
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXUnknown
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 8.000000, 150.000000 }
+AXSize: { 769.000000, 17.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: term b
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXUnknown
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 48.000000, 167.000000 }
+AXSize: { 729.000000, 17.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: meaning 1
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXUnknown
+AXParent: AXList
+AXChildren: 0
+AXPosition: { 48.000000, 184.000000 }
+AXSize: { 729.000000, 17.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: meaning 2
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+
+
+

Added: trunk/LayoutTests/platform/gtk/accessibility/plugin-expected.txt (0 => 153435)


--- trunk/LayoutTests/platform/gtk/accessibility/plugin-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/accessibility/plugin-expected.txt	2013-07-29 18:26:52 UTC (rev 153435)
@@ -0,0 +1,23 @@
+ 
+AXRole: AXGroup
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 8.000000, 8.000000 }
+AXSize: { 784.000000, 150.000000 }
+AXTitle: 
+AXDescription: 
+AXValue: <obj>
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+
+
+

Added: trunk/LayoutTests/platform/gtk/accessibility/table-with-aria-role-expected.txt (0 => 153435)


--- trunk/LayoutTests/platform/gtk/accessibility/table-with-aria-role-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-with-aria-role-expected.txt	2013-07-29 18:26:52 UTC (rev 153435)
@@ -0,0 +1,41 @@
+test	test	test
+test	test	test
+test	test	test
+test	test	test
+AXRole: AXButton
+AXParent: AXWebArea
+AXChildren: 0
+AXPosition: { 8.000000, 8.000000 }
+AXSize: { 85.000000, 50.000000 }
+AXTitle: test test test test test test
+AXDescription: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+AXRole: AXMenu
+AXParent: AXWebArea
+AXChildren: 6
+AXPosition: { 8.000000, 58.000000 }
+AXSize: { 85.000000, 50.000000 }
+AXTitle: 
+AXDescription: 
+AXFocusable: 0
+AXFocused: 0
+AXSelectable: 0
+AXSelected: 0
+AXMultiSelectable: 0
+AXEnabled: 1
+AXExpanded: 0
+AXRequired: 0
+AXChecked: 0
+AXPlatformAttributes: toolkit:WebKitGtk
+------------
+

Modified: trunk/Tools/ChangeLog (153434 => 153435)


--- trunk/Tools/ChangeLog	2013-07-29 18:10:32 UTC (rev 153434)
+++ trunk/Tools/ChangeLog	2013-07-29 18:26:52 UTC (rev 153435)
@@ -1,5 +1,21 @@
 2013-07-29  Mario Sanchez Prada  <[email protected]>
 
+        [ATK] Implement attributesOfChildren() for AccessibilityUIElement
+        https://bugs.webkit.org/show_bug.cgi?id=118967
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Implemented AccessibilityUIElement::attributesOfChildren() both
+        in DumpRenderTree and the WebKitTestRunner.
+
+        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+        (AccessibilityUIElement::attributesOfChildren): Implemented.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::attributesOfChildren): Implemented.
+
+2013-07-29  Mario Sanchez Prada  <[email protected]>
+
         [ATK] Implement allAttributes() for AccessibilityUIElement
         https://bugs.webkit.org/show_bug.cgi?id=118966
 

Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (153434 => 153435)


--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-07-29 18:10:32 UTC (rev 153434)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp	2013-07-29 18:26:52 UTC (rev 153435)
@@ -437,8 +437,16 @@
 
 JSStringRef AccessibilityUIElement::attributesOfChildren()
 {
-    // FIXME: implement
-    return JSStringCreateWithCharacters(0, 0);
+    Vector<AccessibilityUIElement> children;
+    getChildren(children);
+
+    StringBuilder builder;
+    for (Vector<AccessibilityUIElement>::iterator it = children.begin(); it != children.end(); ++it) {
+        builder.append(attributesOfElement(it));
+        builder.append("\n------------\n");
+    }
+
+    return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
 }
 
 JSStringRef AccessibilityUIElement::parameterizedAttributeNames()

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (153434 => 153435)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-07-29 18:10:32 UTC (rev 153434)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2013-07-29 18:26:52 UTC (rev 153435)
@@ -522,8 +522,16 @@
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::attributesOfChildren()
 {
-    // FIXME: implement
-    return JSStringCreateWithCharacters(0, 0);
+    Vector<RefPtr<AccessibilityUIElement> > children;
+    getChildren(children);
+
+    StringBuilder builder;
+    for (Vector<RefPtr<AccessibilityUIElement> >::iterator it = children.begin(); it != children.end(); ++it) {
+        builder.append(attributesOfElement(it->get()));
+        builder.append("\n------------\n");
+    }
+
+    return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
 }
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::allAttributes()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to