Title: [158852] trunk
- Revision
- 158852
- Author
- [email protected]
- Date
- 2013-11-07 09:56:05 -0800 (Thu, 07 Nov 2013)
Log Message
AX: DRT AccessibilityUIElement::isFocused methods should be finished.
https://bugs.webkit.org/show_bug.cgi?id=123774
Reviewed by Chris Fleizach.
Tools:
Implemented AccessibilityUIElement::isFocused methods and removed FIXMEs.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::isFocused):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isFocused):
LayoutTests:
Added Mac platform test so we can validate our AccessibilityUIElement convenience method expectations.
* platform/mac/accessibility/test-convenience-methods-expected.txt: Added.
* platform/mac/accessibility/test-convenience-methods.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (158851 => 158852)
--- trunk/LayoutTests/ChangeLog 2013-11-07 17:17:36 UTC (rev 158851)
+++ trunk/LayoutTests/ChangeLog 2013-11-07 17:56:05 UTC (rev 158852)
@@ -1,3 +1,15 @@
+2013-11-07 Samuel White <[email protected]>
+
+ AX: DRT AccessibilityUIElement::isFocused methods should be finished.
+ https://bugs.webkit.org/show_bug.cgi?id=123774
+
+ Reviewed by Chris Fleizach.
+
+ Added Mac platform test so we can validate our AccessibilityUIElement convenience method expectations.
+
+ * platform/mac/accessibility/test-convenience-methods-expected.txt: Added.
+ * platform/mac/accessibility/test-convenience-methods.html: Added.
+
2013-11-07 Denis Nomiyama <[email protected]>
[GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
Added: trunk/LayoutTests/platform/mac/accessibility/test-convenience-methods-expected.txt (0 => 158852)
--- trunk/LayoutTests/platform/mac/accessibility/test-convenience-methods-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/test-convenience-methods-expected.txt 2013-11-07 17:56:05 UTC (rev 158852)
@@ -0,0 +1,11 @@
+This tests that test convenience methods behave correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS isFocusedConvenience is isFocusedConvenience
+PASS isFocusedConvenience is isFocusedAttribute
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/test-convenience-methods.html (0 => 158852)
--- trunk/LayoutTests/platform/mac/accessibility/test-convenience-methods.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/test-convenience-methods.html 2013-11-07 17:56:05 UTC (rev 158852)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<title>Test Convenience Methods</title>
+</head>
+<body>
+
+<!-- Focus test element. -->
+<div id="focus" role="button" style="height:25px; width:25px;" tabindex="0"></div>
+
+<!-- FIXME: Add remaining test elements. -->
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("This tests that test convenience methods behave correctly.");
+
+ if (window.accessibilityController) {
+ // isFocused test.
+ var focus = accessibilityController.accessibleElementById("focus");
+ var isFocusedAttribute = focus.boolAttributeValue("AXFocused");
+ var isFocusedConvenience = focus.isFocused;
+ shouldBe("isFocusedConvenience", "isFocusedConvenience");
+ document.getElementById("focus").focus();
+ isFocusedAttribute = focus.boolAttributeValue("AXFocused");
+ isFocusedConvenience = focus.isFocused;
+ shouldBe("isFocusedConvenience", "isFocusedAttribute");
+
+ // FIXME: Test remaining convenience methods.
+ }
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Tools/ChangeLog (158851 => 158852)
--- trunk/Tools/ChangeLog 2013-11-07 17:17:36 UTC (rev 158851)
+++ trunk/Tools/ChangeLog 2013-11-07 17:56:05 UTC (rev 158852)
@@ -1,3 +1,17 @@
+2013-11-07 Samuel White <[email protected]>
+
+ AX: DRT AccessibilityUIElement::isFocused methods should be finished.
+ https://bugs.webkit.org/show_bug.cgi?id=123774
+
+ Reviewed by Chris Fleizach.
+
+ Implemented AccessibilityUIElement::isFocused methods and removed FIXMEs.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::isFocused):
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::isFocused):
+
2013-11-07 Dániel Bátyai <[email protected]>
Removed retrieveQMakespecVar function
Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (158851 => 158852)
--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2013-11-07 17:17:36 UTC (rev 158851)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2013-11-07 17:56:05 UTC (rev 158852)
@@ -738,7 +738,12 @@
bool AccessibilityUIElement::isFocused() const
{
- // FIXME: implement
+ BEGIN_AX_OBJC_EXCEPTIONS
+ id value = [m_element accessibilityAttributeValue:NSAccessibilityFocusedAttribute];
+ if ([value isKindOfClass:[NSNumber class]])
+ return [value boolValue];
+ END_AX_OBJC_EXCEPTIONS
+
return false;
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (158851 => 158852)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2013-11-07 17:17:36 UTC (rev 158851)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2013-11-07 17:56:05 UTC (rev 158852)
@@ -749,7 +749,12 @@
bool AccessibilityUIElement::isFocused() const
{
- // FIXME: implement
+ BEGIN_AX_OBJC_EXCEPTIONS
+ id value = [m_element accessibilityAttributeValue:NSAccessibilityFocusedAttribute];
+ if ([value isKindOfClass:[NSNumber class]])
+ return [value boolValue];
+ END_AX_OBJC_EXCEPTIONS
+
return false;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes