AX: iOS accessibility tests are not running because we need WKTR support
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2015 20:58:39 +0000 (20:58 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2015 20:58:39 +0000 (20:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145991

Reviewed by Daniel Bates.

Source/WebCore:

Make some minor modifications to support notification handling in WKTR.

* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
(-[WebAccessibilityObjectWrapper description]):
(-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.

Tools:

Add support for WKTR iOS accessibility.
Utilize the notification handling mechanisms that Mac already uses.
Rename iphone* DRT methods to either use existing methods that are similar, or rename to more generic names.

* DumpRenderTree/AccessibilityUIElement.cpp:
(stringForSelectionCallback):
(getIdentifierCallback):
(getTraitsCallback):
(getElementTextPositionCallback):
(getElementTextLengthCallback):
(AccessibilityUIElement::getJSClass):
(getIPhoneLabelCallback): Deleted.
(getIPhoneHintCallback): Deleted.
(getIPhoneValueCallback): Deleted.
(getIPhoneIdentifierCallback): Deleted.
(getIPhoneTraitsCallback): Deleted.
(getIPhoneIsElementCallback): Deleted.
(getIPhoneElementTextPositionCallback): Deleted.
(getIPhoneElementTextLengthCallback): Deleted.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::identifier):
(AccessibilityUIElement::traits):
(AccessibilityUIElement::elementTextPosition):
(AccessibilityUIElement::elementTextLength):
(AccessibilityUIElement::description):
(AccessibilityUIElement::orientation):
(AccessibilityUIElement::stringValue):
(AccessibilityUIElement::language):
(AccessibilityUIElement::helpText):
(AccessibilityUIElement::intValue):
(AccessibilityUIElement::isSelected):
(AccessibilityUIElement::isExpanded):
(AccessibilityUIElement::documentURI):
(AccessibilityUIElement::addNotificationListener):
(AccessibilityUIElement::removeNotificationListener):
(AccessibilityUIElement::isFocusable):
(AccessibilityUIElement::isIgnored):
(AccessibilityUIElement::hasPopup):
(AccessibilityUIElement::iphoneLabel): Deleted.
(AccessibilityUIElement::iphoneHint): Deleted.
(AccessibilityUIElement::iphoneValue): Deleted.
(AccessibilityUIElement::iphoneIdentifier): Deleted.
(AccessibilityUIElement::iphoneTraits): Deleted.
(AccessibilityUIElement::iphoneIsElement): Deleted.
(AccessibilityUIElement::iphoneElementTextPosition): Deleted.
(AccessibilityUIElement::iphoneElementTextLength): Deleted.
(_accessibilityNotificationCallback): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isValid):
(WTR::AccessibilityUIElement::identifier):
(WTR::AccessibilityUIElement::traits):
(WTR::AccessibilityUIElement::elementTextPosition):
(WTR::AccessibilityUIElement::elementTextLength):
(WTR::AccessibilityUIElement::stringForSelection):
(WTR::AccessibilityUIElement::elementsForRange):
(WTR::AccessibilityUIElement::increaseTextSelection):
(WTR::AccessibilityUIElement::decreaseTextSelection):
(WTR::AccessibilityUIElement::linkedElement):
(WTR::AccessibilityUIElement::headerElementAtIndex):
(WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
(WTR::AccessibilityUIElement::characterAtOffset):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
(WTR::findAccessibleObjectById):
(WTR::AccessibilityController::accessibleElementById):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(+[NSString stringWithJSStringRef:]):
(-[NSString createJSStringRef]):
(WTR::convertNSArrayToVector):
(WTR::concatenateAttributeAndValue):
(WTR::AccessibilityUIElement::AccessibilityUIElement):
(WTR::AccessibilityUIElement::isEqual):
(WTR::AccessibilityUIElement::headerElementAtIndex):
(WTR::AccessibilityUIElement::linkedElement):
(WTR::AccessibilityUIElement::getLinkedUIElements):
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::convertElementsToObjectArray):
(WTR::AccessibilityUIElement::elementsForRange):
(WTR::AccessibilityUIElement::indexOfChild):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::intValue):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::isSelected):
(WTR::AccessibilityUIElement::isSelectedOptionActive):
(WTR::AccessibilityUIElement::stringForRange):
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::traits):
(WTR::AccessibilityUIElement::identifier):
(WTR::AccessibilityUIElement::rowCount):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
(WTR::AccessibilityUIElement::increaseTextSelection):
(WTR::AccessibilityUIElement::decreaseTextSelection):
(WTR::AccessibilityUIElement::stringForSelection):
(WTR::AccessibilityUIElement::elementTextPosition):
(WTR::AccessibilityUIElement::elementTextLength):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::addNotificationListener):
(WTR::AccessibilityUIElement::removeNotificationListener):
(WTR::AccessibilityUIElement::isFocusable):
(WTR::AccessibilityUIElement::isIgnored):
(WTR::AccessibilityUIElement::hasPopup):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):
(WTR::_CGPathEnumerationIteration):
(WTR::AccessibilityUIElement::pathDescription):
(WTR::AccessibilityUIElement::supportedActions):

LayoutTests:

Alter tests so that it addresses:
   1) Utilize the new AX methods which created new expectations.
   2) There were some expectations checked in with failures that are now fixed.
   3) Remove failing test expectations from TestExpectations.

* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/accessibility: Replaced with LayoutTests/platform/ios-simulator/accessibility.
* platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer-expected.txt:
* platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer.html:
* platform/ios-simulator/accessibility/accessibility-hint-expected.txt:
* platform/ios-simulator/accessibility/accessibility-hint.html:
* platform/ios-simulator/accessibility/aria-label-with-internal-text-expected.txt:
* platform/ios-simulator/accessibility/aria-label-with-internal-text.html:
* platform/ios-simulator/accessibility/disabled-states-expected.txt:
* platform/ios-simulator/accessibility/disabled-states.html:
* platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element-expected.txt:
* platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element.html:
* platform/ios-simulator/accessibility/file-upload-button-expected.txt:
* platform/ios-simulator/accessibility/file-upload-button.html:
* platform/ios-simulator/accessibility/focus-change-notifications.html:
* platform/ios-simulator/accessibility/identifier-expected.txt:
* platform/ios-simulator/accessibility/identifier.html:
* platform/ios-simulator/accessibility/internal-link-expected.txt:
* platform/ios-simulator/accessibility/internal-link.html:
* platform/ios-simulator/accessibility/landmark-type-expected.txt:
* platform/ios-simulator/accessibility/landmark-type.html:
* platform/ios-simulator/accessibility/link-with-images-text-expected.txt:
* platform/ios-simulator/accessibility/link-with-images-text.html:
* platform/ios-simulator/accessibility/link-with-only-image-expected.txt:
* platform/ios-simulator/accessibility/link-with-only-image.html:
* platform/ios-simulator/accessibility/math-expected.txt:
* platform/ios-simulator/accessibility/math.html:
* platform/ios-simulator/accessibility/mixed-checkboxes-expected.txt:
* platform/ios-simulator/accessibility/mixed-checkboxes.html:
* platform/ios-simulator/accessibility/no-child-link-header.html:
* platform/ios-simulator/accessibility/non-contiguous-link-expected.txt:
* platform/ios-simulator/accessibility/non-contiguous-link.html:
* platform/ios-simulator/accessibility/password-value-expected.txt:
* platform/ios-simulator/accessibility/password-value.html:
* platform/ios-simulator/accessibility/placeholder-value-expected.txt:
* platform/ios-simulator/accessibility/placeholder-value.html:
* platform/ios-simulator/accessibility/popup-button-value-label-expected.txt:
* platform/ios-simulator/accessibility/popup-button-value-label.html:
* platform/ios-simulator/accessibility/progressbar-expected.txt:
* platform/ios-simulator/accessibility/progressbar.html:
* platform/ios-simulator/accessibility/radio-button-expected.txt:
* platform/ios-simulator/accessibility/radio-button.html:
* platform/ios-simulator/accessibility/secure-text-field.html:
* platform/ios-simulator/accessibility/selected-buttons-expected.txt:
* platform/ios-simulator/accessibility/svg-group-element-with-title-expected.txt:
* platform/ios-simulator/accessibility/svg-group-element-with-title.html:
* platform/ios-simulator/accessibility/tab-role-expected.txt:
* platform/ios-simulator/accessibility/tab-role.html:
* platform/ios-simulator/accessibility/tables-lists-expected.txt:
* platform/ios-simulator/accessibility/tables-lists.html:
* platform/ios-simulator/accessibility/text-marker-list-item-expected.txt:
* platform/ios-simulator/accessibility/text-marker-list-item.html:
* platform/ios-simulator/accessibility/text-marker-validation.html:
* platform/ios-simulator/accessibility/text-role-expected.txt:
* platform/ios-simulator/accessibility/text-role.html:
* platform/ios-simulator/accessibility/textfield-in-axvalue-expected.txt:
* platform/ios-simulator/accessibility/textfield-in-axvalue.html:
* platform/ios-simulator/accessibility/toggle-button.html:
* platform/ios-simulator/accessibility/url-test.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185609 268f45cc-cd09-0410-ab3c-d52691b4dbfc

73 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator-wk1/TestExpectations
LayoutTests/platform/ios-simulator-wk2/TestExpectations
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer-expected.txt
LayoutTests/platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer.html
LayoutTests/platform/ios-simulator/accessibility/accessibility-hint-expected.txt
LayoutTests/platform/ios-simulator/accessibility/accessibility-hint.html
LayoutTests/platform/ios-simulator/accessibility/aria-label-with-internal-text-expected.txt
LayoutTests/platform/ios-simulator/accessibility/aria-label-with-internal-text.html
LayoutTests/platform/ios-simulator/accessibility/disabled-states-expected.txt
LayoutTests/platform/ios-simulator/accessibility/disabled-states.html
LayoutTests/platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element-expected.txt
LayoutTests/platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element.html
LayoutTests/platform/ios-simulator/accessibility/file-upload-button-expected.txt
LayoutTests/platform/ios-simulator/accessibility/file-upload-button.html
LayoutTests/platform/ios-simulator/accessibility/focus-change-notifications.html
LayoutTests/platform/ios-simulator/accessibility/identifier-expected.txt
LayoutTests/platform/ios-simulator/accessibility/identifier.html
LayoutTests/platform/ios-simulator/accessibility/internal-link-expected.txt
LayoutTests/platform/ios-simulator/accessibility/internal-link.html
LayoutTests/platform/ios-simulator/accessibility/landmark-type-expected.txt
LayoutTests/platform/ios-simulator/accessibility/landmark-type.html
LayoutTests/platform/ios-simulator/accessibility/link-with-images-text-expected.txt
LayoutTests/platform/ios-simulator/accessibility/link-with-images-text.html
LayoutTests/platform/ios-simulator/accessibility/link-with-only-image-expected.txt
LayoutTests/platform/ios-simulator/accessibility/link-with-only-image.html
LayoutTests/platform/ios-simulator/accessibility/math-expected.txt
LayoutTests/platform/ios-simulator/accessibility/math.html
LayoutTests/platform/ios-simulator/accessibility/mixed-checkboxes-expected.txt
LayoutTests/platform/ios-simulator/accessibility/mixed-checkboxes.html
LayoutTests/platform/ios-simulator/accessibility/no-child-link-header.html
LayoutTests/platform/ios-simulator/accessibility/non-contiguous-link-expected.txt
LayoutTests/platform/ios-simulator/accessibility/non-contiguous-link.html
LayoutTests/platform/ios-simulator/accessibility/password-value-expected.txt
LayoutTests/platform/ios-simulator/accessibility/password-value.html
LayoutTests/platform/ios-simulator/accessibility/placeholder-value-expected.txt
LayoutTests/platform/ios-simulator/accessibility/placeholder-value.html
LayoutTests/platform/ios-simulator/accessibility/popup-button-value-label-expected.txt
LayoutTests/platform/ios-simulator/accessibility/popup-button-value-label.html
LayoutTests/platform/ios-simulator/accessibility/progressbar-expected.txt
LayoutTests/platform/ios-simulator/accessibility/progressbar.html
LayoutTests/platform/ios-simulator/accessibility/radio-button-expected.txt
LayoutTests/platform/ios-simulator/accessibility/radio-button.html
LayoutTests/platform/ios-simulator/accessibility/secure-text-field.html
LayoutTests/platform/ios-simulator/accessibility/selected-buttons-expected.txt
LayoutTests/platform/ios-simulator/accessibility/svg-group-element-with-title-expected.txt
LayoutTests/platform/ios-simulator/accessibility/svg-group-element-with-title.html
LayoutTests/platform/ios-simulator/accessibility/tab-role-expected.txt
LayoutTests/platform/ios-simulator/accessibility/tab-role.html
LayoutTests/platform/ios-simulator/accessibility/tables-lists-expected.txt
LayoutTests/platform/ios-simulator/accessibility/tables-lists.html
LayoutTests/platform/ios-simulator/accessibility/text-marker-list-item-expected.txt
LayoutTests/platform/ios-simulator/accessibility/text-marker-list-item.html
LayoutTests/platform/ios-simulator/accessibility/text-marker-validation.html
LayoutTests/platform/ios-simulator/accessibility/text-role-expected.txt
LayoutTests/platform/ios-simulator/accessibility/text-role.html
LayoutTests/platform/ios-simulator/accessibility/textfield-in-axvalue-expected.txt
LayoutTests/platform/ios-simulator/accessibility/textfield-in-axvalue.html
LayoutTests/platform/ios-simulator/accessibility/toggle-button.html
LayoutTests/platform/ios-simulator/accessibility/url-test.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityUIElement.cpp
Tools/DumpRenderTree/AccessibilityUIElement.h
Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm
Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm

index afb7605239b22a62496cf7147fe31d53615a3d8f..2a967fd17c0cce7504824b19f7b11390fef2db1f 100644 (file)
@@ -1,3 +1,77 @@
+2015-06-15  Chris Fleizach  <cfleizach@apple.com>
+
+        AX:  iOS accessibility tests are not running because we need WKTR support
+        https://bugs.webkit.org/show_bug.cgi?id=145991
+
+        Reviewed by Daniel Bates.
+
+        Alter tests so that it addresses:
+           1) Utilize the new AX methods which created new expectations.
+           2) There were some expectations checked in with failures that are now fixed.
+           3) Remove failing test expectations from TestExpectations.
+
+        * platform/ios-simulator-wk1/TestExpectations:
+        * platform/ios-simulator-wk2/TestExpectations:
+        * platform/ios-simulator/TestExpectations:
+        * platform/ios-simulator/accessibility: Replaced with LayoutTests/platform/ios-simulator/accessibility.
+        * platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer-expected.txt:
+        * platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer.html:
+        * platform/ios-simulator/accessibility/accessibility-hint-expected.txt:
+        * platform/ios-simulator/accessibility/accessibility-hint.html:
+        * platform/ios-simulator/accessibility/aria-label-with-internal-text-expected.txt:
+        * platform/ios-simulator/accessibility/aria-label-with-internal-text.html:
+        * platform/ios-simulator/accessibility/disabled-states-expected.txt:
+        * platform/ios-simulator/accessibility/disabled-states.html:
+        * platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element-expected.txt:
+        * platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element.html:
+        * platform/ios-simulator/accessibility/file-upload-button-expected.txt:
+        * platform/ios-simulator/accessibility/file-upload-button.html:
+        * platform/ios-simulator/accessibility/focus-change-notifications.html:
+        * platform/ios-simulator/accessibility/identifier-expected.txt:
+        * platform/ios-simulator/accessibility/identifier.html:
+        * platform/ios-simulator/accessibility/internal-link-expected.txt:
+        * platform/ios-simulator/accessibility/internal-link.html:
+        * platform/ios-simulator/accessibility/landmark-type-expected.txt:
+        * platform/ios-simulator/accessibility/landmark-type.html:
+        * platform/ios-simulator/accessibility/link-with-images-text-expected.txt:
+        * platform/ios-simulator/accessibility/link-with-images-text.html:
+        * platform/ios-simulator/accessibility/link-with-only-image-expected.txt:
+        * platform/ios-simulator/accessibility/link-with-only-image.html:
+        * platform/ios-simulator/accessibility/math-expected.txt:
+        * platform/ios-simulator/accessibility/math.html:
+        * platform/ios-simulator/accessibility/mixed-checkboxes-expected.txt:
+        * platform/ios-simulator/accessibility/mixed-checkboxes.html:
+        * platform/ios-simulator/accessibility/no-child-link-header.html:
+        * platform/ios-simulator/accessibility/non-contiguous-link-expected.txt:
+        * platform/ios-simulator/accessibility/non-contiguous-link.html:
+        * platform/ios-simulator/accessibility/password-value-expected.txt:
+        * platform/ios-simulator/accessibility/password-value.html:
+        * platform/ios-simulator/accessibility/placeholder-value-expected.txt:
+        * platform/ios-simulator/accessibility/placeholder-value.html:
+        * platform/ios-simulator/accessibility/popup-button-value-label-expected.txt:
+        * platform/ios-simulator/accessibility/popup-button-value-label.html:
+        * platform/ios-simulator/accessibility/progressbar-expected.txt:
+        * platform/ios-simulator/accessibility/progressbar.html:
+        * platform/ios-simulator/accessibility/radio-button-expected.txt:
+        * platform/ios-simulator/accessibility/radio-button.html:
+        * platform/ios-simulator/accessibility/secure-text-field.html:
+        * platform/ios-simulator/accessibility/selected-buttons-expected.txt:
+        * platform/ios-simulator/accessibility/svg-group-element-with-title-expected.txt:
+        * platform/ios-simulator/accessibility/svg-group-element-with-title.html:
+        * platform/ios-simulator/accessibility/tab-role-expected.txt:
+        * platform/ios-simulator/accessibility/tab-role.html:
+        * platform/ios-simulator/accessibility/tables-lists-expected.txt:
+        * platform/ios-simulator/accessibility/tables-lists.html:
+        * platform/ios-simulator/accessibility/text-marker-list-item-expected.txt:
+        * platform/ios-simulator/accessibility/text-marker-list-item.html:
+        * platform/ios-simulator/accessibility/text-marker-validation.html:
+        * platform/ios-simulator/accessibility/text-role-expected.txt:
+        * platform/ios-simulator/accessibility/text-role.html:
+        * platform/ios-simulator/accessibility/textfield-in-axvalue-expected.txt:
+        * platform/ios-simulator/accessibility/textfield-in-axvalue.html:
+        * platform/ios-simulator/accessibility/toggle-button.html:
+        * platform/ios-simulator/accessibility/url-test.html:
+
 2015-06-16  Brent Fulgham  <bfulgham@apple.com>
 
         CSS Scroll Snap - support snapping to nested elements
index 59c3c5ca8a74de6af8382ce68d5a696d38989881..6618b05a4ba2d55b21e2c0f584e14b320c10d01f 100644 (file)
@@ -1682,7 +1682,6 @@ inspector-protocol/debugger/nested-inspectors.html [ Failure ]
 inspector-protocol/debugger/regress-133182.html [ Failure ]
 inspector-protocol/dom/getAccessibilityPropertiesForNode.html [ Failure ]
 inspector-protocol/page/javascriptDialogEvents.html [ Failure ]
-platform/ios-simulator/accessibility/disabled-states.html [ Failure ]
 platform/ios-simulator/ios/fast/text/underline-scaling.html [ Failure ]
 svg/custom/linking-uri-01-b.svg [ Failure ]
 compositing/backgrounds/background-image-with-negative-zindex.html [ ImageOnlyFailure ]
@@ -1731,4 +1730,4 @@ fast/dom/MutationObserver/database-callback-delivery.html [ Crash ]
 fast/history/history-length.html [ Crash ]
 storage/websql/alter-to-info-table.html [ Crash ]
 
-webkit.org/b/145432 media/video-transformed-by-javascript.html [ Failure ]
\ No newline at end of file
+webkit.org/b/145432 media/video-transformed-by-javascript.html [ Failure ]
index cb44c3e69cd8cf2fb9573fc2a72e1da76204f379..1a2b5ef99a1653d07947f05accc678194654011a 100644 (file)
@@ -1707,8 +1707,6 @@ platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed.html
 platform/ios-simulator/ios/fast/coordinates/mouse-event.html
 
 # iOS-specific tests that time out or fail in WebKitTestRunner due to missing DRT-specific functionality:
-platform/ios-simulator/accessibility
-platform/ios-simulator/ios/accessibility
 platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed.html
 platform/ios-simulator/ios/fast/coordinates/touch-event.html
 platform/ios-simulator/ios/fast/events/touch/input-touch-target.html
index c6c276c4d236c9f58becfaa9a42b368395b6e89a..9d8c5049c14c4f1df556403bad6bf372cbf6138c 100644 (file)
@@ -2580,7 +2580,6 @@ sputnik/Unicode/Unicode_510/S7.6_A5.3_T2.html [ Failure ]
 storage/websql/sql-error-codes.html [ Failure ]
 
 # iOS-specific tests that fail:
-platform/ios-simulator/accessibility/text-marker-list-item.html [ Failure ]
 platform/ios-simulator/ios/compositing/overlap-page-scale.html [ Failure ]
 platform/ios-simulator/ios/fast/fixed/absolute-over-fixed.html [ Failure ]
 platform/ios-simulator/ios/fast/fixed/fixed-in-transform.html [ Failure ]
index 0e24d1e2031a51e80c66134f0b45cc56b737692d..009872820b2ebdfcc033df059f62aa74ee321df7 100644 (file)
@@ -3,8 +3,8 @@ This makes sure that we don't crash when asking for the parent element of an obj
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS link.iphoneLabel is 'AXLabel: yellow'
-FAIL link.parentElement().iphoneLabel should be AXLabel: . Threw exception TypeError: undefined is not an object (evaluating 'link.parentElement().iphoneLabel')
+PASS link.description is 'AXLabel: yellow'
+PASS link.parentElement() == null || link.parentElement().isValid is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 0f758f80ea0bdc4824da4702813a8cd978da792f..6e3308db179269cfea7829c0fa5f530e464e46b8 100644 (file)
@@ -8,12 +8,15 @@ var successfullyParsed = false;
 </head>
 <body id="body">
 
+<div id="container" role="group">
+
 <img src="resources/cake.png" usemap="#map" id="backImg" alt="" width="225" height="206">
 
-<map name="map" aria-labelledby="papercolor">
+<map id="link" name="map" aria-labelledby="papercolor">
         <area shape="rect" tabindex="0" alt="yellow" href="#" coords="19,28,46,52" id="yellow">
         <area shape="rect" tabindex="0" alt="orange" href="#" coords="58,28,85,52" id="orange">
 </map>
+</div>
 
 <p id="description"></p>
 <div id="console"></div>
@@ -24,14 +27,13 @@ var successfullyParsed = false;
 
     if (window.accessibilityController) {
 
-        document.getElementById("body").focus();
-        var link = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
-        shouldBe("link.iphoneLabel", "'AXLabel: yellow'");
+        var link = accessibilityController.accessibleElementById("container").childAtIndex(0);
+        shouldBe("link.description", "'AXLabel: yellow'");
 
         document.getElementById("backImg").parentNode.removeChild(document.getElementById("backImg"));
 
         // Should not crash here when asking for parentElement (even though it was removed).
-        shouldBe("link.parentElement().iphoneLabel", "'AXLabel: '");
+        shouldBeTrue("link.parentElement() == null || link.parentElement().isValid");
     }
 
     successfullyParsed = true;
index 6da34e792a3b3e866b012640b64000ae5c64d4df..de01a2a0fc739b2ade4a64a5678a7aed41972d75 100644 (file)
@@ -4,7 +4,7 @@ This makes sure that the title attribute is used as accessibilityHint
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS link.iphoneHint is 'AXHint: This is a hint'
+PASS link.helpText is 'AXHint: This is a hint'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 9bc91944d1a41ec6a42e90fdcd12f283a5e36751..4e96297ce9ddd9ad58a8d18cd1e3e35669fe3a31 100644 (file)
@@ -21,7 +21,7 @@ var successfullyParsed = false;
 
         document.getElementById("link").focus();
         var link = accessibilityController.focusedElement;
-        shouldBe("link.iphoneHint", "'AXHint: This is a hint'");
+        shouldBe("link.helpText", "'AXHint: This is a hint'");
     }
 
     successfullyParsed = true;
index 5b6996a369e26e1fa156a330af3e53ca276c5bd5..27d6092ab49416e19d792c30ec79467d0fc922df 100644 (file)
@@ -8,13 +8,13 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Button 1 should expose alternative text only.
-PASS button1.iphoneLabel is 'AXLabel: PLAY'
+PASS button1.description is 'AXLabel: PLAY'
 Button 2 should expose internal text only.
-PASS button2.iphoneLabel is 'AXLabel: 1'
+PASS button2.description is 'AXLabel: 1'
 Text 1 should rely on the stringValue() in the label field.
-PASS text1.iphoneLabel is 'AXLabel: text1'
+PASS text1.description is 'AXLabel: text1'
 Link1 should combine the title field and the aria-label field.
-FAIL link1.iphoneLabel should be AXLabel: link1, link1-title. Was AXLabel: link1.
+FAIL link1.description should be AXLabel: link1, link1-title. Was AXLabel: link1.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index fef0af857693167917f91b285bbe323bf35503c3..dc03bc306de207507d56bff09051c7d815a6051e 100644 (file)
@@ -24,19 +24,19 @@ var successfullyParsed = false;
 
         var button1 = accessibilityController.accessibleElementById("button1");
         debug("Button 1 should expose alternative text only.");
-        shouldBe("button1.iphoneLabel", "'AXLabel: PLAY'");
+        shouldBe("button1.description", "'AXLabel: PLAY'");
 
         var button2 = accessibilityController.accessibleElementById("button2");
         debug("Button 2 should expose internal text only.");
-        shouldBe("button2.iphoneLabel", "'AXLabel: 1'");
+        shouldBe("button2.description", "'AXLabel: 1'");
 
         var text1 = accessibilityController.accessibleElementById("text1");
         debug("Text 1 should rely on the stringValue() in the label field.");
-        shouldBe("text1.iphoneLabel", "'AXLabel: text1'");
+        shouldBe("text1.description", "'AXLabel: text1'");
 
         var link1 = accessibilityController.accessibleElementById("link1");
         debug("Link1 should combine the title field and the aria-label field.");
-        shouldBe("link1.iphoneLabel", "'AXLabel: link1, link1-title'");
+        shouldBe("link1.description", "'AXLabel: link1, link1-title'");
     }
 
     successfullyParsed = true;
index 66922bd081bf6fe5b250793e6d552b8aaa9dd6ce..f85ed0b156c25f8a3307ec0e1b3e9ee72ff29cc8 100644 (file)
@@ -1,6 +1,16 @@
-CONSOLE MESSAGE: line 26: TypeError: HTMLParagraphElement is not a function (evaluating 'description("This test thats disabled and aria-disabled change the traits returned.")')
 button 1
 button 2
 button 3
  
+This test thats disabled and aria-disabled change the traits returned.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS btn1.traits != btn2.traits is true
+PASS btn2.traits == btn3.traits is true
+PASS select1.traits != select2.traits is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index c4b32aaca4e8dfe49ff89c8a31b7048f7490aadc..849436aee8af1db1ce2ec3a675a26d36b8eb33b7 100644 (file)
@@ -1,12 +1,9 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
-<script src="../../../fast/js/resources/js-test-pre.js"></script>
+<script src="../../../resources/js-test-pre.js"></script>
 <script>
 var successfullyParsed = false;
-if (window.testRunner)
-  testRunner.dumpAsText();
 </script>
 </head>
 <body>
@@ -32,11 +29,11 @@ if (window.testRunner)
 
        document.getElementById("button2").focus();
        var btn2 = accessibilityController.focusedElement;
-       shouldBe("btn1.iphoneTraits != btn2.iphoneTraits", "true");
+       shouldBe("btn1.traits != btn2.traits", "true");
 
        document.getElementById("button3").focus();
        var btn3 = accessibilityController.focusedElement;
-       shouldBe("btn2.iphoneTraits == btn3.iphoneTraits", "true");
+       shouldBe("btn2.traits == btn3.traits", "true");
 
        document.getElementById("select1").focus();
        var select1 = accessibilityController.focusedElement;
@@ -44,13 +41,13 @@ if (window.testRunner)
        document.getElementById("select2").focus();
        var select2 = accessibilityController.focusedElement;
 
-       shouldBe("select1.iphoneTraits != select2.iphoneTraits", "true");
+       shouldBe("select1.traits != select2.traits", "true");
    }
 
    successfullyParsed = true;
 </script>
 
-<script src="../../../fast/js/resources/js-test-post.js"></script>
+<script src="../../../resources/js-test-post.js"></script>
 
 </body>
 </html>
index df984e1e9178229d7b412bf61c2bede36e9ca19a..26e187579ede691c41d09b6b444f1e481a6b2ee5 100644 (file)
@@ -6,9 +6,9 @@ This tests that accessibilityElementDidBecomeFocused will be propagated to the c
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS textInsideLink.iphoneLabel is 'AXLabel: link1'
+PASS textInsideLink.description is 'AXLabel: link1'
 PASS accessibilityController.focusedElement.childAtIndex(0).isEqual(textInsideLink) is true
-PASS textInsideHeading.iphoneLabel is 'AXLabel: heading1'
+PASS textInsideHeading.description is 'AXLabel: heading1'
 PASS accessibilityController.focusedElement.childAtIndex(0).isEqual(textInsideHeading) is true
 PASS successfullyParsed is true
 
index d728339d86f54ea363cfa90044245c9bbe3bebfa..64cefbb6f71c09754ce9de7686203e980c324a2a 100644 (file)
@@ -23,8 +23,8 @@
         var body = accessibilityController.rootElement;
 
         // Get access to the text inside the link.
-        var textInsideLink = body.childAtIndex(0).childAtIndex(0).childAtIndex(0);
-        shouldBe("textInsideLink.iphoneLabel", "'AXLabel: link1'");
+        var textInsideLink = accessibilityController.accessibleElementById("link1").childAtIndex(0);
+        shouldBe("textInsideLink.description", "'AXLabel: link1'");
 
         // Simulate VoiceOver focus onto the element.
         textInsideLink.assistiveTechnologySimulatedFocus();
@@ -35,8 +35,8 @@
         // Repeat for text inside link inside heading.
 
         // Get access to the text inside the link.
-        var textInsideHeading = body.childAtIndex(1).childAtIndex(0);
-        shouldBe("textInsideHeading.iphoneLabel", "'AXLabel: heading1'");
+        var textInsideHeading = accessibilityController.accessibleElementById("heading1").childAtIndex(0);
+        shouldBe("textInsideHeading.description", "'AXLabel: heading1'");
 
         // Simulate VoiceOver focus onto the element.
         textInsideHeading.assistiveTechnologySimulatedFocus();
index 7b9e7570b63a71f83f48a85561b5dbf007f17543..4c52bb905a803a3487a09a1dcae7b7bac4a83bba 100644 (file)
@@ -4,8 +4,8 @@ This tests that the label and value are correct for input file types.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS button1.iphoneLabel is 'AXLabel: Choose File'
-PASS button1.iphoneValue is 'AXValue: no file selected'
+PASS button1.description is 'AXLabel: Choose File'
+PASS button1.stringValue is 'AXValue: no file selected'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 0d10acea7fc4ba8016eb617e5e299878314c5a83..17dcdac321d49aa0f024e6b8044c859772af9bc3 100644 (file)
@@ -20,8 +20,8 @@ var successfullyParsed = false;
     if (window.accessibilityController) {
 
         var button1 = accessibilityController.accessibleElementById("file-input");
-        shouldBe("button1.iphoneLabel", "'AXLabel: Choose File'");
-        shouldBe("button1.iphoneValue", "'AXValue: no file selected'");
+        shouldBe("button1.description", "'AXLabel: Choose File'");
+        shouldBe("button1.stringValue", "'AXValue: no file selected'");
     }
 
     successfullyParsed = true;
index 414cd3fee44c84f00a50c291a077a7ea85b66599..6f1d0efb360dd3493a9b7baf136cc7d23ef6e127 100644 (file)
@@ -20,7 +20,7 @@ var successfullyParsed = false;
 
     var focusChangeCount = 0;
     var rootElement = 0;
-    function focusCallback(notification) {
+    function focusCallback(notification) { 
         if (notification == "AXFocusChanged") {
             focusChangeCount++;
 
@@ -34,10 +34,15 @@ var successfullyParsed = false;
 
     if (window.accessibilityController) {
         // Make sure AX gets turned on.
-        rootElement = accessibilityController.rootElement;
+        rootElement = accessibilityController.rootElement.childAtIndex(0);
         window.testRunner.waitUntilDone();
 
         var addedNotification = rootElement.addNotificationListener(focusCallback);
+        if (!addedNotification) {
+            rootElement = accessibilityController.rootElement;
+            addedNotification = rootElement.addNotificationListener(focusCallback);
+        }
+
         shouldBe("addedNotification", "true");
 
         // Switch focus from h1.
index 381dd49ea2bc8e28627e863bc7be386549187fbc..8a969cfe3c1a3ff0578ddae9da2449e0be138c60 100644 (file)
@@ -4,7 +4,7 @@ This tests that id maps to AXIdentifier correctly
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS button1.iphoneIdentifier is 'AXIdentifier: button1'
+PASS button1.identifier is 'AXIdentifier: button1'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 076028491c67597e469eaecdc6942881cbebc839..83fa21bb07216b5c693d7ee562c83faff745e358 100644 (file)
@@ -24,7 +24,7 @@ if (window.testRunner)
         // Make sure a checkbox with a label DOES NOT have the same center point as the frame
         document.getElementById("button1").focus();
         var button1 = accessibilityController.focusedElement;
-        shouldBe("button1.iphoneIdentifier", "'AXIdentifier: button1'");
+        shouldBe("button1.identifier", "'AXIdentifier: button1'");
     }
 
     successfullyParsed = true;
index d88318e381d42b636c5b1f37ea96e7fd86dbcaf3..33f404d225929cb89a1140caf056c703d565515e 100644 (file)
@@ -11,7 +11,7 @@ This test thats internal links return their linked elements
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS link.linkedElement().iphoneLabel is 'AXLabel: Linked Element'
+PASS link.linkedElement().description is 'AXLabel: Linked Element'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index fdaae3f12c306a4c68d05c4d88a1b8f38eaf2102..c2a5b57dcfb6591137b99cb7a5c1db6f854c7402 100644 (file)
@@ -28,7 +28,7 @@ if (window.testRunner)
 
         document.getElementById("name").focus();
         var link = accessibilityController.focusedElement;
-        shouldBe("link.linkedElement().iphoneLabel", "'AXLabel: Linked Element'");
+        shouldBe("link.linkedElement().description", "'AXLabel: Linked Element'");
     }
 
     successfullyParsed = true;
index d5d4114360afbda884f8b4777f364afd9e03e6c3..37c085c2e40a63580f63ecbc81ff0e6f89a6cd12 100644 (file)
@@ -5,8 +5,8 @@ This tests that landmarks return their type as part of the AX label.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS main.iphoneLabel is 'AXLabel: main'
-PASS banner.iphoneLabel is 'AXLabel: banner'
+PASS main.description is 'AXLabel: main'
+PASS banner.description is 'AXLabel: banner'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 5f392fff1141203644dade0c5bde030dfe204861..04d82e5212d1e7e250c2e455419996299726c1f0 100644 (file)
@@ -26,10 +26,10 @@ text
     if (window.accessibilityController) {
 
         var main = accessibilityController.accessibleElementById("main");
-        shouldBe("main.iphoneLabel", "'AXLabel: main'");
+        shouldBe("main.description", "'AXLabel: main'");
 
         var banner = accessibilityController.accessibleElementById("banner");
-        shouldBe("banner.iphoneLabel", "'AXLabel: banner'");
+        shouldBe("banner.description", "'AXLabel: banner'");
     }
 
     successfullyParsed = true;
index 94b4bc1c917bc33f14a586637811cd63663f50b8..095262b2525fa741aedf315b3830d00af5ee4da7 100644 (file)
@@ -4,8 +4,8 @@ This test makes sure that a link with images and text appears as a link.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS obj.iphoneIsElement is true
-FAIL obj.iphoneLabel should be AXLabel:  iPhoneFrom $99. Was AXLabel: iPhone From $99.
+PASS obj.isIgnored is false
+PASS obj.description is 'AXLabel: iPhone From $99'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 859935e5f8d428fea9f20445f1c324d1d701ed75..356e75ff67fb2ed7c7107b74b11e85e337f16b5f 100644 (file)
@@ -10,7 +10,7 @@ if (window.testRunner)
 </head>
 <body>
 
-<a href="store.html">
+<a href="store.html" id="link">
 <span>
 <img src="image.gif" width=100 height=100 alt="">
 <strong>iPhone</strong>From $99</span>                                                     
@@ -25,9 +25,9 @@ if (window.testRunner)
 
     if (window.accessibilityController) {
 
-        var obj = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
-        shouldBe("obj.iphoneIsElement", "true");
-        shouldBe("obj.iphoneLabel", "'AXLabel:  iPhoneFrom $99'");
+        var obj = accessibilityController.accessibleElementById("link");
+        shouldBe("obj.isIgnored", "false");
+        shouldBe("obj.description", "'AXLabel: iPhone From $99'");
     }
 
     successfullyParsed = true;
index b167b17d90f08b606f23e47fc79267e079a90e71..d68d686cf8a5e5e915cc3f234ea31d1272c499b5 100644 (file)
@@ -4,8 +4,8 @@ This test makes sure that a link with only an image will report the correct labe
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS obj.iphoneIsElement is true
-PASS obj.iphoneLabel is 'AXLabel: Hello World'
+FAIL obj.isIgnored should be false. Was true.
+PASS obj.description is 'AXLabel: Hello World'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index dde578f8abae65ceba7a5f5b26b03bc6690a25d9..8217cdaaa12ecfe5e40207dc5ba94ca5b36c283a 100644 (file)
@@ -10,7 +10,7 @@ if (window.testRunner)
 </head>
 <body>
 
-<a href="store.html">
+<a href="store.html" id="link">
 <img src="image.gif" width=100 height=100 alt="Hello World">
 </a>
 
@@ -23,9 +23,9 @@ if (window.testRunner)
 
     if (window.accessibilityController) {
 
-        var obj = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0).childAtIndex(0);
-        shouldBe("obj.iphoneIsElement", "true");
-        shouldBe("obj.iphoneLabel", "'AXLabel: Hello World'");
+        var obj = accessibilityController.accessibleElementById("link");
+        shouldBeFalse("obj.isIgnored");
+        shouldBe("obj.description", "'AXLabel: Hello World'");
     }
 
     successfullyParsed = true;
index 8f2be24331e489f4514de577bd609fd1bdfd6807..b811100090464e85ed742e9034c8f9c3863a66d3 100644 (file)
@@ -17,16 +17,16 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS group.childrenCount is 5
-PASS group.childAtIndex(0).iphoneLabel is 'AXLabel: Raman scattering study of the'
-PASS group.childAtIndex(1).iphoneLabel is 'AXLabel:  F e sub 1  minus x, end subscript. C o sub x, S b sub 2, math'
-PASS group.childAtIndex(2).iphoneLabel is 'AXLabel: and'
-PASS group.childAtIndex(3).iphoneLabel is 'AXLabel:   open, 0  less than or equal to x  less than or equal to 1,  close, math'
-PASS group.childAtIndex(4).iphoneLabel is 'AXLabel: single crystals.'
-PASS group.childAtIndex(0).iphoneIsElement is true
-PASS group.childAtIndex(1).iphoneIsElement is true
-PASS group.childAtIndex(2).iphoneIsElement is true
-PASS group.childAtIndex(3).iphoneIsElement is true
-PASS group.childAtIndex(4).iphoneIsElement is true
+PASS group.childAtIndex(0).description is 'AXLabel: Raman scattering study of the'
+PASS group.childAtIndex(1).description is 'AXLabel:  F e sub 1  minus x, end subscript. C o sub x, S b sub 2, math'
+PASS group.childAtIndex(2).description is 'AXLabel: and'
+PASS group.childAtIndex(3).description is 'AXLabel:   open, 0  less than or equal to x  less than or equal to 1,  close, math'
+PASS group.childAtIndex(4).description is 'AXLabel: single crystals.'
+PASS group.childAtIndex(0).isIgnored is false
+PASS group.childAtIndex(1).isIgnored is false
+PASS group.childAtIndex(2).isIgnored is false
+PASS group.childAtIndex(3).isIgnored is false
+PASS group.childAtIndex(4).isIgnored is false
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 216ad07bd420a8c72db579d0e695a94f7d0d2957..e7c260a01075736b92f6162e452b9ca334c4a00c 100644 (file)
@@ -74,17 +74,17 @@ if (window.testRunner)
        document.getElementById("group").focus();
        var group = accessibilityController.focusedElement;
        shouldBe("group.childrenCount", "5");
-       shouldBe("group.childAtIndex(0).iphoneLabel", "'AXLabel: Raman scattering study of the'");
-       shouldBe("group.childAtIndex(1).iphoneLabel", "'AXLabel:  F e sub 1  minus x, end subscript. C o sub x, S b sub 2, math'");
-       shouldBe("group.childAtIndex(2).iphoneLabel", "'AXLabel: and'");
-       shouldBe("group.childAtIndex(3).iphoneLabel", "'AXLabel:   open, 0  less than or equal to x  less than or equal to 1,  close, math'");
-       shouldBe("group.childAtIndex(4).iphoneLabel", "'AXLabel: single crystals.'");
+       shouldBe("group.childAtIndex(0).description", "'AXLabel: Raman scattering study of the'");
+       shouldBe("group.childAtIndex(1).description", "'AXLabel:  F e sub 1  minus x, end subscript. C o sub x, S b sub 2, math'");
+       shouldBe("group.childAtIndex(2).description", "'AXLabel: and'");
+       shouldBe("group.childAtIndex(3).description", "'AXLabel:   open, 0  less than or equal to x  less than or equal to 1,  close, math'");
+       shouldBe("group.childAtIndex(4).description", "'AXLabel: single crystals.'");
 
-       shouldBeTrue("group.childAtIndex(0).iphoneIsElement");
-       shouldBeTrue("group.childAtIndex(1).iphoneIsElement");
-       shouldBeTrue("group.childAtIndex(2).iphoneIsElement");
-       shouldBeTrue("group.childAtIndex(3).iphoneIsElement");
-       shouldBeTrue("group.childAtIndex(4).iphoneIsElement");
+       shouldBeFalse("group.childAtIndex(0).isIgnored");
+       shouldBeFalse("group.childAtIndex(1).isIgnored");
+       shouldBeFalse("group.childAtIndex(2).isIgnored");
+       shouldBeFalse("group.childAtIndex(3).isIgnored");
+       shouldBeFalse("group.childAtIndex(4).isIgnored");
    }
 
    successfullyParsed = true;
index d6de928b22ae2363b7a6cadafbacc9e9308a591a..4fadb7e729fae46109f817e8f3a5818c05b57baa 100644 (file)
@@ -8,11 +8,11 @@ This test makes sure that a checkbox (ARIA or otherwise) returns its status thro
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS accessibilityController.focusedElement.iphoneValue is 'AXValue: 0'
-PASS accessibilityController.focusedElement.iphoneValue is 'AXValue: 1'
-PASS accessibilityController.focusedElement.iphoneValue is 'AXValue: 2'
-PASS accessibilityController.focusedElement.iphoneValue is 'AXValue: 1'
-PASS accessibilityController.focusedElement.iphoneValue is 'AXValue: 0'
+PASS accessibilityController.focusedElement.stringValue is 'AXValue: 0'
+PASS accessibilityController.focusedElement.stringValue is 'AXValue: 1'
+PASS accessibilityController.focusedElement.stringValue is 'AXValue: 2'
+PASS accessibilityController.focusedElement.stringValue is 'AXValue: 1'
+PASS accessibilityController.focusedElement.stringValue is 'AXValue: 0'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 9acb46d219663798e75d7e1745e5d99fbedc7ccb..4851f092ce154a6f716118121fccf3e33d39045c 100644 (file)
@@ -29,19 +29,19 @@ if (window.testRunner)
     if (window.accessibilityController) {
 
         document.getElementById("check1").focus();
-        shouldBe("accessibilityController.focusedElement.iphoneValue", "'AXValue: 0'");
+        shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 0'");
 
         document.getElementById("check2").focus();
-        shouldBe("accessibilityController.focusedElement.iphoneValue", "'AXValue: 1'");
+        shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 1'");
 
         document.getElementById("check3").focus();
-        shouldBe("accessibilityController.focusedElement.iphoneValue", "'AXValue: 2'");
+        shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 2'");
 
         document.getElementById("check4").focus();
-        shouldBe("accessibilityController.focusedElement.iphoneValue", "'AXValue: 1'");
+        shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 1'");
 
         document.getElementById("check5").focus();
-        shouldBe("accessibilityController.focusedElement.iphoneValue", "'AXValue: 0'");
+        shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: 0'");
     }
 
     successfullyParsed = true;
index 6e802c738559cc44fc7ac679ac0c335a1fe64bf9..54f427aa719e9786519fc82aeb612a6dac42737d 100644 (file)
@@ -8,9 +8,9 @@
 </head>
 <body>
 
-<a href="#" title="LINK"><img alt="" src="empty.png" width=100 height=100></a>
+<a id="link" href="#" title="LINK"><img alt="" src="empty.png" width=100 height=100></a>
 
-<div role="heading" aria-label="HEADING" style='border:1px solid black; width:100px; height:100px;'></div>
+<div id="heading" role="heading" aria-label="HEADING" style='border:1px solid black; width:100px; height:100px;'></div>
 
 
 <script>
@@ -19,8 +19,8 @@
 
     if (window.accessibilityController) {
 
-        var obj = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
-        var succeeded = obj.iphoneIsElement && obj.iphoneLabel == "AXLabel: LINK";
+        var obj = accessibilityController.accessibleElementById("link");
+        var succeeded = !obj.isIgnored && obj.description == "AXLabel: LINK";
 
         //  shouldBe("succeeded", "true");
         var failed = false;
@@ -28,8 +28,8 @@
             failed = true;
         }
 
-        obj = accessibilityController.rootElement.childAtIndex(1);
-        succeeded = obj.iphoneIsElement && obj.iphoneLabel == "AXLabel: HEADING";
+        obj = accessibilityController.accessibleElementById("heading");
+        succeeded = !obj.isIgnored && obj.description == "AXLabel: HEADING";
         //  shouldBe("succeeded", "true");
 
         if (!succeeded) {
index cf5b707471c39f110085d8a89fdf9a620b8bd3dc..bc5e0fea7c7232d89ee8bbf42be6bde2def055c6 100644 (file)
@@ -1,2 +1,12 @@
-ALERT: Tests passed
 This is a link that would normally appear as multiple elements.
+This test makes sure that only one element is returned for the link object, instead of many elements that are all links.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS obj.description is 'AXLabel: This is a link that would normally appear as multiple elements'
+PASS obj.isIgnored is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index 73860d5514443e1b5dedd43f6161c7da6837bdeb..57c01a0653d2dcd8eaabcd30724df798cd7e7166 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
 <script>
     if (window.testRunner)
         testRunner.dumpAsText();
 </head>
 <body>
 
-<a href="#">This is a link that <b>would</b> normally appear <b>as multiple</b> elements</a>.
+<a id="link" href="#">This is a link that <b>would</b> normally appear <b>as multiple</b> elements</a>.
+
+<p id="description"></p>
+<div id="console"></div>
 
 <script>
 
-    //description("This test makes sure that only one element is returned for the link object, instead of many elements that are all links.");
+    description("This test makes sure that only one element is returned for the link object, instead of many elements that are all links.");
 
     if (window.accessibilityController) {
 
-        var obj = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
-        var succeeded = obj.iphoneLabel == "AXLabel: This is a link that would normally appear as multiple elements";
-        //  shouldBe("succeeded", "true");
-        var failed = false;
-        if (!succeeded) {
-            failed = true;
-        }
-
-        succeeded = obj.iphoneIsElement;
-        //  shouldBe("succeeded", "true");
-
-        if (!succeeded) {
-           failed = true;
-        }
-
-        if (failed)
-            alert("Tests failed");
-        else
-           alert("Tests passed");
-
+        var obj = accessibilityController.accessibleElementById("link");
+        shouldBe("obj.description", "'AXLabel: This is a link that would normally appear as multiple elements'");
+        shouldBeFalse("obj.isIgnored");
     }
 
     successfullyParsed = true;
 </script>
+<script src="../../../resources/js-test-post.js"></script>
 
 
 </body>
index c9045449429ab2cb6547e8b4fc4445580d6474df..8fa0be443849a2ddbe3dc92230fafbefdc7a8f73 100644 (file)
@@ -4,8 +4,8 @@ This test that a password field returns a string of equal length to the password
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS pass.iphoneValue.length is password.length + axValue.length
-PASS pass.iphoneValue == password is false
+PASS pass.stringValue.length is password.length + axValue.length
+PASS pass.stringValue == password is false
 PASS successfullyParsed is true
 
 TEST COMPLETE
index ad7d93b12479dee27a22560ae770f7b8ceed7f3b..9dbff3ebb85584027e2c00d473b4efaf6b308e9a 100644 (file)
@@ -28,8 +28,8 @@ if (window.testRunner)
         var pass = accessibilityController.focusedElement;
 
         var axValue = "AXValue: ";
-        shouldBe("pass.iphoneValue.length", "password.length + axValue.length");
-        shouldBeFalse("pass.iphoneValue == password");
+        shouldBe("pass.stringValue.length", "password.length + axValue.length");
+        shouldBeFalse("pass.stringValue == password");
     }
 
     successfullyParsed = true;
index ab862a50642e9588c13ca94bb03eec685262a272..825cd9d9ca7e10da9b9c421afb57223654224133 100644 (file)
@@ -5,7 +5,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS pass.stringAttributeValue('AXPlaceholderValue') is 'place'
-PASS pass.iphoneValue is 'AXValue: val'
+PASS pass.stringValue is 'AXValue: val'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 655be8fc8be5a4615a697ee2bb2d5aa86c144f89..dda5f3f798d8a890c75bccae05fab6aebb070fe3 100644 (file)
@@ -26,7 +26,7 @@ if (window.testRunner)
         var pass = accessibilityController.focusedElement;
 
         shouldBe("pass.stringAttributeValue('AXPlaceholderValue')", "'place'");
-        shouldBe("pass.iphoneValue", "'AXValue: val'");
+        shouldBe("pass.stringValue", "'AXValue: val'");
     }
 
     successfullyParsed = true;
index 1e87ac2fef30b39055d931336ab79d06f541fc73..a592c259d6328b6f14c83ef6efa2afd0272cbe58 100644 (file)
@@ -4,10 +4,10 @@ This tests that a popup button will return the selected item through its value a
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS pass.iphoneValue is 'AXValue: item 1'
-PASS pass.iphoneLabel is 'AXLabel: '
-PASS pass.iphoneValue is 'AXValue: item 2'
-PASS pass.iphoneLabel is 'AXLabel: Popup'
+PASS pass.stringValue is 'AXValue: item 1'
+PASS pass.description is 'AXLabel: '
+PASS pass.stringValue is 'AXValue: item 2'
+PASS pass.description is 'AXLabel: Popup'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 78ae2d5588a01a9814a9ca40fad81f7342cf9610..66d58cf4c5749e10aa8148e98b9cf2bdfdfa1528 100644 (file)
@@ -33,15 +33,15 @@ if (window.testRunner)
         document.getElementById("pop").focus();
         var pass = accessibilityController.focusedElement;
 
-        shouldBe("pass.iphoneValue", "'AXValue: item 1'");
-        shouldBe("pass.iphoneLabel", "'AXLabel: '");
+        shouldBe("pass.stringValue", "'AXValue: item 1'");
+        shouldBe("pass.description", "'AXLabel: '");
 
         // Check the second popup button.
         document.getElementById("pop2").focus();
         pass = accessibilityController.focusedElement;
 
-        shouldBe("pass.iphoneValue", "'AXValue: item 2'");
-        shouldBe("pass.iphoneLabel", "'AXLabel: Popup'");
+        shouldBe("pass.stringValue", "'AXValue: item 2'");
+        shouldBe("pass.description", "'AXLabel: Popup'");
     }
 
     successfullyParsed = true;
index 69bbe73973276c499dfaa286d0256dee0befbaf1..eb0e858545f05bbb05457d63312c505a3ebee27c 100644 (file)
@@ -4,9 +4,9 @@ This tests that progress bars show up in the AX hierarchy and that min, current
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS button1.iphoneLabel is 'AXLabel: Popularity'
-PASS button1.iphoneValue is 'AXValue: 5.00'
-PASS button1.iphoneIsElement is true
+PASS button1.description is 'AXLabel: Popularity'
+PASS button1.stringValue is 'AXValue: 5.00'
+PASS button1.isIgnored is false
 PASS button1.minValue is 1
 PASS button1.maxValue is 12
 PASS successfullyParsed is true
index b2c63d2d1e63286b7ac99ab485019f5455fbe7c2..0711401cfbd9f9cf7f79108d87a6afd5a90175cb 100644 (file)
@@ -20,9 +20,9 @@ var successfullyParsed = false;
     if (window.accessibilityController) {
 
         var button1 = accessibilityController.accessibleElementById("progressbar");
-        shouldBe("button1.iphoneLabel", "'AXLabel: Popularity'");
-        shouldBe("button1.iphoneValue", "'AXValue: 5.00'");
-        shouldBeTrue("button1.iphoneIsElement");
+        shouldBe("button1.description", "'AXLabel: Popularity'");
+        shouldBe("button1.stringValue", "'AXValue: 5.00'");
+        shouldBeFalse("button1.isIgnored");
         shouldBe("button1.minValue", "1");
         shouldBe("button1.maxValue", "12");
     }
index bba89dfd2c5bc70fa96b43339ae426399339bc70..4e2cfc9eccf5a681d2635cdf647b2f8450806794 100644 (file)
@@ -4,10 +4,10 @@ This tests that radio buttons are exposed as distinct types from checkboxes, tha
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS checkbox.iphoneTraits != radio1.iphoneTraits is true
-PASS radio1.iphoneValue is 'AXValue: 1'
-PASS radio2.iphoneValue is 'AXValue: 0'
-PASS radio3.iphoneValue is 'AXValue: 0'
+PASS checkbox.traits != radio1.traits is true
+PASS radio1.stringValue is 'AXValue: 1'
+PASS radio2.stringValue is 'AXValue: 0'
+PASS radio3.stringValue is 'AXValue: 0'
 PASS radio1.rowIndexRange() is '{0, 3}'
 PASS radio2.rowIndexRange() is '{1, 3}'
 PASS radio3.rowIndexRange() is '{2, 3}'
index 8f1df528429269477d46353158a3a77fc2ba1fee..a18b5422007998a5bcd6274005df2ae45830e5a1 100644 (file)
         var radio3 = accessibilityController.focusedElement;
 
         // Verify checkbox and radio have different traits.
-        shouldBeTrue("checkbox.iphoneTraits != radio1.iphoneTraits");
+        shouldBeTrue("checkbox.traits != radio1.traits");
 
         // Verify the value of the checked radio item is correct.
-        shouldBe("radio1.iphoneValue", "'AXValue: 1'");
-        shouldBe("radio2.iphoneValue", "'AXValue: 0'");
-        shouldBe("radio3.iphoneValue", "'AXValue: 0'");
+        shouldBe("radio1.stringValue", "'AXValue: 1'");
+        shouldBe("radio2.stringValue", "'AXValue: 0'");
+        shouldBe("radio3.stringValue", "'AXValue: 0'");
 
         // Verify the radio buttons are part of a group.
         shouldBe("radio1.rowIndexRange()", "'{0, 3}'");
index 580d6d2ea62f6db8f789e5a36a866ecf6c2e8b6b..4c69144727c85f7a8c87bbade08b3bc24c4bdf52 100644 (file)
@@ -18,9 +18,9 @@
 
     if (window.accessibilityController) {
 
-        var passfield = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
-        var textfield = accessibilityController.rootElement.childAtIndex(0).childAtIndex(1);
-        var succeeded = passfield.iphoneTraits != textfield.iphoneTraits;
+        var passfield = accessibilityController.accessibleElementById("pass");
+        var textfield = accessibilityController.accessibleElementById("text");
+        var succeeded = passfield.traits != textfield.traits;
 
         //  shouldBe("succeeded", "true");
         var failed = false;
index 9b69b9d65f56d2b05029d963813c175dfbc4884a..3aa11c4b80b8f833b60a017d7315006036d7583e 100644 (file)
@@ -7,9 +7,9 @@ This tests that aria-selected behaves as expected (by returning the right traits
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-FAIL button1.isSelected should be true. Was false.
+PASS button1.isSelected is true
 PASS button2.isSelected is false
-FAIL tab1.isSelected should be true. Was false.
+PASS tab1.isSelected is true
 PASS tab2.isSelected is false
 PASS successfullyParsed is true
 
index 18d8d8d96acbc7928d915649c7f4bb16bdfa9455..ce0973377185c0f3e033a0fba725e15303d9c32c 100644 (file)
@@ -4,8 +4,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Verify that the SVG group is returned as an accessible element.
-PASS group1.iphoneLabel is 'AXLabel: SVG TITLE 1'
-PASS group1.iphoneIsElement is true
+PASS group1.description is 'AXLabel: SVG TITLE 1'
+PASS group1.isIgnored is false
 
 Verify that you can hit-test to the SVG group.
 PASS hitTestElement.isEqual(group1) is true
index 10ea36ecebae5700878d8fb2f1b076503f89f540..1f690f277b8af1840964c2a52e390586cfe51a32 100644 (file)
@@ -23,8 +23,8 @@
 
           debug("Verify that the SVG group is returned as an accessible element.");
           var group1 = accessibilityController.accessibleElementById("group1");
-          shouldBe("group1.iphoneLabel", "'AXLabel: SVG TITLE 1'");
-          shouldBeTrue("group1.iphoneIsElement");
+          shouldBe("group1.description", "'AXLabel: SVG TITLE 1'");
+          shouldBeFalse("group1.isIgnored");
 
           debug("\nVerify that you can hit-test to the SVG group.");
           var hitTestElement = accessibilityController.elementAtPoint(group1.clickPointX, group1.clickPointY);
index 3d6cdd7e59bf915c57bcea683a22b5ebbf91f5ca..65aa4b9a1e79c6be8cf61dde4330c197078a064b 100644 (file)
@@ -5,10 +5,10 @@ This test makes sure that role='tab' shows up as a distinct element from button.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS tab.iphoneLabel is 'AXLabel: tab1'
-PASS button.iphoneTraits != tab.iphoneTraits is true
-PASS tab.iphoneTraits != 0 is true
-FAIL tab.isSelected should be true. Was false.
+PASS tab.description is 'AXLabel: tab1'
+PASS button.traits != tab.traits is true
+PASS tab.traits != 0 is true
+PASS tab.isSelected is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
index acfd5ade551459c66d98fbdf8cbd4795818dd492..7e95fe12a51cd669924bd09df500365dccf1b077 100644 (file)
@@ -25,14 +25,14 @@ if (window.testRunner)
 
         document.getElementById("fakeButton").focus();
         var tab = accessibilityController.focusedElement;
-        shouldBe("tab.iphoneLabel", "'AXLabel: tab1'");
+        shouldBe("tab.description", "'AXLabel: tab1'");
 
         // Now make sure it has the same traits as a button.
         document.getElementById("realButton").focus();
         var button = accessibilityController.focusedElement;
 
-        shouldBeTrue("button.iphoneTraits != tab.iphoneTraits");
-        shouldBeTrue("tab.iphoneTraits != 0");
+        shouldBeTrue("button.traits != tab.traits");
+        shouldBeTrue("tab.traits != 0");
 
         shouldBeTrue("tab.isSelected");
     }
index 5b325d7f77368d3abeec4f7937c99153501f6633..277f03e59170039fa5a5136f2c5ebf47ae1abff2 100644 (file)
@@ -7,12 +7,12 @@ This test makes sure that items in lists, tables and landmarks have different tr
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS listItem.iphoneTraits != initialItem.iphoneTraits is true
-PASS listItem.iphoneTraits != tableItem.iphoneTraits is true
-FAIL listItem.iphoneTraits != landmarkItem.iphoneTraits should be true. Threw exception TypeError: undefined is not an object (evaluating 'landmarkItem.iphoneTraits')
-PASS tableItem.iphoneTraits != initialItem.iphoneTraits is true
-FAIL tableItem.iphoneTraits != landmarkItem.iphoneTraits should be true. Threw exception TypeError: undefined is not an object (evaluating 'landmarkItem.iphoneTraits')
-FAIL landmarkItem.iphoneTraits != initialItem.iphoneTraits should be true. Threw exception TypeError: undefined is not an object (evaluating 'landmarkItem.iphoneTraits')
+PASS listItem.traits != initialItem.traits is true
+PASS listItem.traits != tableItem.traits is true
+PASS listItem.traits != landmarkItem.traits is true
+PASS tableItem.traits != initialItem.traits is true
+PASS tableItem.traits != landmarkItem.traits is true
+PASS landmarkItem.traits != initialItem.traits is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
index dbce3ee1ceaab63fdc67629dbc57aa62616f9dda..10bc0d89fafc261ae6a67156a71f9c0daf6581fd 100644 (file)
@@ -8,6 +8,8 @@ var successfullyParsed = false;
 </head>
 <body id="body">
 
+<div id="content" role="group">
+
 item 1
 
 <ol>
@@ -24,6 +26,8 @@ item 1
 <b>landmark 1</b>
 </div>
 
+</div>
+
 <p id="description"></p>
 <div id="console"></div>
 
@@ -33,21 +37,21 @@ item 1
 
     if (window.accessibilityController) {
 
-        var root = accessibilityController.rootElement;
+        var root = accessibilityController.accessibleElementById("content");
        
         var initialItem = root.childAtIndex(0).childAtIndex(0);
         var listItem = root.childAtIndex(1).childAtIndex(0).childAtIndex(0);
         var tableItem = root.childAtIndex(2).childAtIndex(0);
-        var landmarkItem = root.childAtIndex(5).childAtIndex(0).childAtIndex(0);
+        var landmarkItem = root.childAtIndex(3).childAtIndex(0);
 
-        shouldBe("listItem.iphoneTraits != initialItem.iphoneTraits", "true");
-        shouldBe("listItem.iphoneTraits != tableItem.iphoneTraits", "true");
-        shouldBe("listItem.iphoneTraits != landmarkItem.iphoneTraits", "true");
+        shouldBe("listItem.traits != initialItem.traits", "true");
+        shouldBe("listItem.traits != tableItem.traits", "true");
+        shouldBe("listItem.traits != landmarkItem.traits", "true");
 
-        shouldBe("tableItem.iphoneTraits != initialItem.iphoneTraits", "true");
-        shouldBe("tableItem.iphoneTraits != landmarkItem.iphoneTraits", "true");
+        shouldBe("tableItem.traits != initialItem.traits", "true");
+        shouldBe("tableItem.traits != landmarkItem.traits", "true");
 
-        shouldBe("landmarkItem.iphoneTraits != initialItem.iphoneTraits", "true");
+        shouldBe("landmarkItem.traits != initialItem.traits", "true");
     }
 
     successfullyParsed = true;
index 1e6b19abe43368ea1a06873780b7211a13cc32cd..8cad9e058aaf42254a8d8402c652b69234baedc0 100644 (file)
@@ -4,7 +4,7 @@ This test ensures that when asking for the string for a range, it includes the l
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS text is '1. item 1'
+FAIL text should be 1. item 1. Was 1. .
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 1f72cc133c1759f8f82bd086d4f57ce09103faab..f9635ab10a521f9d5760a10160cc828eccae944a 100644 (file)
@@ -8,7 +8,7 @@ var successfullyParsed = false;
 </head>
 <body id="body">
 
-<ol>
+<ol id="list">
 <li>item 1</li>
 </ol>
 
@@ -21,7 +21,7 @@ var successfullyParsed = false;
 
     if (window.accessibilityController) {
 
-        var obj = accessibilityController.rootElement;
+        var obj = accessibilityController.accessibleElementById("list");
         var text = obj.stringForRange(0, 6);
         shouldBe("text", "'1. item 1'");
     }
index 5d0534776a8e0b4bf8a41eae9e8dea8cfdc18a20..9cf27fd509b07fa22dcefb22623312d4a14dfe42 100644 (file)
@@ -8,10 +8,10 @@ var successfullyParsed = false;
 </head>
 <body>
 
-<div>element 1</div>
-<div>element 2</div>
-<div>element 3</div>
-<div>element 4</div>
+<div id="element1">element 1</div>
+<div id="element2">element 2</div>
+<div id="element3">element 3</div>
+<div id="element4">element 4</div>
 
 <p id="description"></p>
 <div id="console"></div>
@@ -22,10 +22,10 @@ var successfullyParsed = false;
 
     if (window.accessibilityController) {
 
-        var obj = accessibilityController.rootElement.childAtIndex(2);
+        var obj = accessibilityController.accessibleElementById("element3");
 
-        var textPos = obj.iphoneElementTextPosition;
-        var textLen = obj.iphoneElementTextLength;
+        var textPos = obj.elementTextPosition;
+        var textLen = obj.elementTextLength;
 
         var succeeded = textPos == 20 && textLen == 9;
         shouldBe("succeeded", "true");
index f1d8e5352c88a844c0536a961a1cc239199fd6a5..0816f20d4dc0d3df34d5b417a440d4028f095f7c 100644 (file)
@@ -4,7 +4,7 @@ This test ensures that the "text" role works as expected. That is, it creates a
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS textrole.iphoneLabel is 'AXLabel: all at once'
+PASS textrole.description is 'AXLabel: all at once'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 01abb7a2976e98f80264a158a85ad2bda5198ccb..648801b1191e40419a7ce2d1402d6a5087a3bf2f 100644 (file)
@@ -23,9 +23,8 @@ var successfullyParsed = false;
 
     if (window.accessibilityController) {
 
-        document.getElementById("textrole").focus();
-        var textrole = accessibilityController.rootElement.childAtIndex(0);
-        shouldBe("textrole.iphoneLabel", "'AXLabel: all at once'");
+        var textrole = accessibilityController.accessibleElementById("textrole");
+        shouldBe("textrole.description", "'AXLabel: all at once'");
     }
 
     successfullyParsed = true;
index 86839ece6777f49fc47349bdaafb247684dde793..901f2eeddb37f4e5ad1a7744f82c9bab3e9bba94 100644 (file)
@@ -8,12 +8,12 @@ This test ensures that textfields return their content in accessibilityValue, an
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS textfield.iphoneLabel is 'AXLabel: Search'
-PASS textfield.iphoneValue is 'AXValue: hello'
-PASS h1.iphoneLabel is 'AXLabel: H1 Test'
-PASS h1.iphoneValue is 'AXValue: 1'
-PASS button.iphoneLabel is 'AXLabel: Button Title'
-PASS button.iphoneValue is 'AXValue: '
+PASS textfield.description is 'AXLabel: Search'
+PASS textfield.stringValue is 'AXValue: hello'
+PASS h1.description is 'AXLabel: H1 Test'
+PASS h1.stringValue is 'AXValue: 1'
+PASS button.description is 'AXLabel: Button Title'
+PASS button.stringValue is 'AXValue: '
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 1afc3c354f7b29c43c54fce7fdecaf785abea1c3..ecac2d2a09cfe1edc84c039d056013f40ddae7db 100644 (file)
@@ -22,18 +22,18 @@ var successfullyParsed = false;
 
     if (window.accessibilityController) {
 
-        var textfield = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
-        shouldBe("textfield.iphoneLabel", "'AXLabel: Search'");
-        shouldBe("textfield.iphoneValue", "'AXValue: hello'");
+        var textfield = accessibilityController.accessibleElementById("textfield");
+        shouldBe("textfield.description", "'AXLabel: Search'");
+        shouldBe("textfield.stringValue", "'AXValue: hello'");
 
-        var h1 = accessibilityController.rootElement.childAtIndex(1);
-        shouldBe("h1.iphoneLabel", "'AXLabel: H1 Test'");
+        var h1 = accessibilityController.accessibleElementById("h1");
+        shouldBe("h1.description", "'AXLabel: H1 Test'");
         // Should be 1 for the heading level.
-        shouldBe("h1.iphoneValue", "'AXValue: 1'");
+        shouldBe("h1.stringValue", "'AXValue: 1'");
 
-        var button = accessibilityController.rootElement.childAtIndex(2).childAtIndex(0);
-        shouldBe("button.iphoneLabel", "'AXLabel: Button Title'");
-        shouldBe("button.iphoneValue", "'AXValue: '");
+        var button = accessibilityController.accessibleElementById("button");
+        shouldBe("button.description", "'AXLabel: Button Title'");
+        shouldBe("button.stringValue", "'AXValue: '");
     }
 
     successfullyParsed = true;
index a0fe0b5226661fb80944316535ceee2d87c8d54d..5ebd2f775f85c276127a525475bccccb55fa04c6 100644 (file)
@@ -21,12 +21,12 @@ var successfullyParsed = false;
     if (window.accessibilityController) {
 
         var button1 = accessibilityController.accessibleElementById("button1");
-        debug("Button1 : " + button1.iphoneLabel);
-        debug("Button1 : " + button1.iphoneValue);
+        debug("Button1 : " + button1.description);
+        debug("Button1 : " + button1.stringValue);
 
         var button2 = accessibilityController.accessibleElementById("button2");
-        debug("Button2 : " + button2.iphoneLabel);
-        debug("Button2 : " + button2.iphoneValue);
+        debug("Button2 : " + button2.description);
+        debug("Button2 : " + button2.stringValue);
     }
 
     successfullyParsed = true;
index 14c7c141a4f14afbabd943d421d296b2d08228c0..95e8f157c59558990662f81b139c8e4395170c76 100644 (file)
@@ -8,9 +8,9 @@ var successfullyParsed = false;
 </head>
 <body id="body">
 
-<input type="image" src="url-test1.html"><BR>
-<a href="#url-test2.html">test</a><BR>
-<img src="url-test3.png" width=100 height=100 alt="test"><BR>
+<input id="element1" type="image" src="url-test1.html"><BR>
+<a id="element2" href="#url-test2.html">test</a><BR>
+<img id="element3" src="url-test3.png" width=100 height=100 alt="test"><BR>
 
 
 <p id="description"></p>
@@ -22,13 +22,13 @@ var successfullyParsed = false;
 
     if (window.accessibilityController) {
 
-        var element = accessibilityController.rootElement.childAtIndex(0).childAtIndex(0);
+        var element = accessibilityController.accessibleElementById("element1");
         shouldBe("element.url.indexOf('url-test1.html') != -1", "true");
 
-        element = accessibilityController.rootElement.childAtIndex(0).childAtIndex(1);
+        element = accessibilityController.accessibleElementById("element2");
         shouldBe("element.url.indexOf('url-test2.html') != -1", "true");
 
-        element = accessibilityController.rootElement.childAtIndex(0).childAtIndex(2);
+        element = accessibilityController.accessibleElementById("element3");
         shouldBe("element.url.indexOf('url-test3.png') != -1", "true");
     }
 
index 098ecca45dd27a7848cca98e06f93ffa99f29366..78302efbee1305f411d2eb9203c8922ba98c929f 100644 (file)
@@ -1,3 +1,21 @@
+2015-06-15  Chris Fleizach  <cfleizach@apple.com>
+
+        AX:  iOS accessibility tests are not running because we need WKTR support
+        https://bugs.webkit.org/show_bug.cgi?id=145991
+
+        Reviewed by Daniel Bates.
+
+        Make some minor modifications to support notification handling in WKTR.
+
+        * accessibility/ios/AXObjectCacheIOS.mm:
+        (WebCore::AXObjectCache::postPlatformNotification):
+        (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
+        (-[WebAccessibilityObjectWrapper description]):
+        (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
+        (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.
+
 2015-06-16  Mark Lam  <mark.lam@apple.com>
 
         Use NakedPtr<Exception>& to return exception results.
index a5ad53c5063a30c37f7fccc050ccf32ebef363ef..a6a14a2642082d4ec7e7a9e9b8d27a12481f32b6 100644 (file)
@@ -95,7 +95,8 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
     }
     
     // Used by DRT to know when notifications are posted.
-    [obj->wrapper() accessibilityPostedNotification:notificationString];
+    if (notificationString)
+        [obj->wrapper() accessibilityPostedNotification:notificationString];
 }
 
 void AXObjectCache::postTextStateChangePlatformNotification(AccessibilityObject* object, const AXTextStateChangeIntent&, const VisibleSelection&)
index 8fc27e7844c7c1e6f8ee485db02ae55ed9e38ac6..c48a675690bc7f27e9e7d176502d3be9b1cf3750 100644 (file)
@@ -2525,24 +2525,6 @@ static void AXAttributedStringAppendText(NSMutableAttributedString* attrString,
     return m_object->clickPoint();
 }
 
-// These are used by DRT so that it can know when notifications are sent.
-// Since they are static, only one callback can be installed at a time (that's all DRT should need).
-typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
-static AXPostedNotificationCallback AXNotificationCallback = nullptr;
-static void* AXPostedNotificationContext = nullptr;
-
-- (void)accessibilitySetPostedNotificationCallback:(AXPostedNotificationCallback)function withContext:(void*)context
-{
-    AXNotificationCallback = function;
-    AXPostedNotificationContext = context;
-}
-
-- (void)accessibilityPostedNotification:(NSString *)notificationName
-{
-    if (AXNotificationCallback && notificationName)
-        AXNotificationCallback(self, notificationName, AXPostedNotificationContext);
-}
-
 #ifndef NDEBUG
 - (NSString *)description
 {
index 8f429f7e4179e3b3a32bdd0791f1c5826dd09251..bda739afcaf960e6b1524fbe2042bad63e9984bc 100644 (file)
@@ -1,3 +1,134 @@
+2015-06-15  Chris Fleizach  <cfleizach@apple.com>
+
+        AX:  iOS accessibility tests are not running because we need WKTR support
+        https://bugs.webkit.org/show_bug.cgi?id=145991
+
+        Reviewed by Daniel Bates.
+
+        Add support for WKTR iOS accessibility.
+        Utilize the notification handling mechanisms that Mac already uses.
+        Rename iphone* DRT methods to either use existing methods that are similar, or rename to more generic names.
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        (stringForSelectionCallback):
+        (getIdentifierCallback):
+        (getTraitsCallback):
+        (getElementTextPositionCallback):
+        (getElementTextLengthCallback):
+        (AccessibilityUIElement::getJSClass):
+        (getIPhoneLabelCallback): Deleted.
+        (getIPhoneHintCallback): Deleted.
+        (getIPhoneValueCallback): Deleted.
+        (getIPhoneIdentifierCallback): Deleted.
+        (getIPhoneTraitsCallback): Deleted.
+        (getIPhoneIsElementCallback): Deleted.
+        (getIPhoneElementTextPositionCallback): Deleted.
+        (getIPhoneElementTextLengthCallback): Deleted.
+        * DumpRenderTree/AccessibilityUIElement.h:
+        * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+        (AccessibilityUIElement::identifier):
+        (AccessibilityUIElement::traits):
+        (AccessibilityUIElement::elementTextPosition):
+        (AccessibilityUIElement::elementTextLength):
+        (AccessibilityUIElement::description):
+        (AccessibilityUIElement::orientation):
+        (AccessibilityUIElement::stringValue):
+        (AccessibilityUIElement::language):
+        (AccessibilityUIElement::helpText):
+        (AccessibilityUIElement::intValue):
+        (AccessibilityUIElement::isSelected):
+        (AccessibilityUIElement::isExpanded):
+        (AccessibilityUIElement::documentURI):
+        (AccessibilityUIElement::addNotificationListener):
+        (AccessibilityUIElement::removeNotificationListener):
+        (AccessibilityUIElement::isFocusable):
+        (AccessibilityUIElement::isIgnored):
+        (AccessibilityUIElement::hasPopup):
+        (AccessibilityUIElement::iphoneLabel): Deleted.
+        (AccessibilityUIElement::iphoneHint): Deleted.
+        (AccessibilityUIElement::iphoneValue): Deleted.
+        (AccessibilityUIElement::iphoneIdentifier): Deleted.
+        (AccessibilityUIElement::iphoneTraits): Deleted.
+        (AccessibilityUIElement::iphoneIsElement): Deleted.
+        (AccessibilityUIElement::iphoneElementTextPosition): Deleted.
+        (AccessibilityUIElement::iphoneElementTextLength): Deleted.
+        (_accessibilityNotificationCallback): Deleted.
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+        (WTR::AccessibilityUIElement::isValid):
+        (WTR::AccessibilityUIElement::identifier):
+        (WTR::AccessibilityUIElement::traits):
+        (WTR::AccessibilityUIElement::elementTextPosition):
+        (WTR::AccessibilityUIElement::elementTextLength):
+        (WTR::AccessibilityUIElement::stringForSelection):
+        (WTR::AccessibilityUIElement::elementsForRange):
+        (WTR::AccessibilityUIElement::increaseTextSelection):
+        (WTR::AccessibilityUIElement::decreaseTextSelection):
+        (WTR::AccessibilityUIElement::linkedElement):
+        (WTR::AccessibilityUIElement::headerElementAtIndex):
+        (WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
+        (WTR::AccessibilityUIElement::characterAtOffset):
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+        * WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
+        (WTR::findAccessibleObjectById):
+        (WTR::AccessibilityController::accessibleElementById):
+        * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+        (+[NSString stringWithJSStringRef:]):
+        (-[NSString createJSStringRef]):
+        (WTR::convertNSArrayToVector):
+        (WTR::concatenateAttributeAndValue):
+        (WTR::AccessibilityUIElement::AccessibilityUIElement):
+        (WTR::AccessibilityUIElement::isEqual):
+        (WTR::AccessibilityUIElement::headerElementAtIndex):
+        (WTR::AccessibilityUIElement::linkedElement):
+        (WTR::AccessibilityUIElement::getLinkedUIElements):
+        (WTR::AccessibilityUIElement::elementAtPoint):
+        (WTR::convertElementsToObjectArray):
+        (WTR::AccessibilityUIElement::elementsForRange):
+        (WTR::AccessibilityUIElement::indexOfChild):
+        (WTR::AccessibilityUIElement::stringAttributeValue):
+        (WTR::AccessibilityUIElement::description):
+        (WTR::AccessibilityUIElement::orientation):
+        (WTR::AccessibilityUIElement::stringValue):
+        (WTR::AccessibilityUIElement::language):
+        (WTR::AccessibilityUIElement::helpText):
+        (WTR::AccessibilityUIElement::x):
+        (WTR::AccessibilityUIElement::clickPointX):
+        (WTR::AccessibilityUIElement::clickPointY):
+        (WTR::AccessibilityUIElement::intValue):
+        (WTR::AccessibilityUIElement::minValue):
+        (WTR::AccessibilityUIElement::maxValue):
+        (WTR::AccessibilityUIElement::valueDescription):
+        (WTR::AccessibilityUIElement::isSelected):
+        (WTR::AccessibilityUIElement::isSelectedOptionActive):
+        (WTR::AccessibilityUIElement::stringForRange):
+        (WTR::AccessibilityUIElement::attributedStringForRange):
+        (WTR::AccessibilityUIElement::attributesOfHeader):
+        (WTR::AccessibilityUIElement::traits):
+        (WTR::AccessibilityUIElement::identifier):
+        (WTR::AccessibilityUIElement::rowCount):
+        (WTR::AccessibilityUIElement::rowIndexRange):
+        (WTR::AccessibilityUIElement::columnIndexRange):
+        (WTR::AccessibilityUIElement::cellForColumnAndRow):
+        (WTR::AccessibilityUIElement::horizontalScrollbar):
+        (WTR::AccessibilityUIElement::documentURI):
+        (WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
+        (WTR::AccessibilityUIElement::increaseTextSelection):
+        (WTR::AccessibilityUIElement::decreaseTextSelection):
+        (WTR::AccessibilityUIElement::stringForSelection):
+        (WTR::AccessibilityUIElement::elementTextPosition):
+        (WTR::AccessibilityUIElement::elementTextLength):
+        (WTR::AccessibilityUIElement::url):
+        (WTR::AccessibilityUIElement::addNotificationListener):
+        (WTR::AccessibilityUIElement::removeNotificationListener):
+        (WTR::AccessibilityUIElement::isFocusable):
+        (WTR::AccessibilityUIElement::isIgnored):
+        (WTR::AccessibilityUIElement::hasPopup):
+        (WTR::AccessibilityUIElement::mathPrescriptsDescription):
+        (WTR::_CGPathEnumerationIteration):
+        (WTR::AccessibilityUIElement::pathDescription):
+        (WTR::AccessibilityUIElement::supportedActions):
+
 2015-06-16  Mark Lam  <mark.lam@apple.com>
 
         Use NakedPtr<Exception>& to return exception results.
index 6abd88c7855daa6c2393c9478a40c58ea3f8f975..489a357e0f6d47e2d26c25706a935b2d4d534368 100644 (file)
@@ -1304,50 +1304,27 @@ static JSValueRef stringForSelectionCallback(JSContextRef context, JSObjectRef t
     return JSValueMakeString(context, labelString.get());
 }
 
-static JSValueRef getIPhoneLabelCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+static JSValueRef getIdentifierCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    JSRetainPtr<JSStringRef> labelString(Adopt, toAXElement(thisObject)->iphoneLabel());
-    return JSValueMakeString(context, labelString.get());
-}
-
-static JSValueRef getIPhoneHintCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
-{
-    JSRetainPtr<JSStringRef> hintString(Adopt, toAXElement(thisObject)->iphoneHint());
-    return JSValueMakeString(context, hintString.get());
-}
-
-static JSValueRef getIPhoneValueCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
-{
-    JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->iphoneValue());
-    return JSValueMakeString(context, valueString.get());
-}
-
-static JSValueRef getIPhoneIdentifierCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
-{
-    JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->iphoneIdentifier());
+    JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->identifier());
     return JSValueMakeString(context, valueString.get());
 }
 
 
-static JSValueRef getIPhoneTraitsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+static JSValueRef getTraitsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->iphoneTraits());
+    JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->traits());
     return JSValueMakeString(context, valueString.get());
 }
 
-static JSValueRef getIPhoneIsElementCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
-{
-    return JSValueMakeBoolean(context, toAXElement(thisObject)->iphoneIsElement());
-}
-
-static JSValueRef getIPhoneElementTextPositionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+static JSValueRef getElementTextPositionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    return JSValueMakeNumber(context, toAXElement(thisObject)->iphoneElementTextPosition());
+    return JSValueMakeNumber(context, toAXElement(thisObject)->elementTextPosition());
 }
 
-static JSValueRef getIPhoneElementTextLengthCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+static JSValueRef getElementTextLengthCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    return JSValueMakeNumber(context, toAXElement(thisObject)->iphoneElementTextLength());
+    return JSValueMakeNumber(context, toAXElement(thisObject)->elementTextLength());
 }
 
 #endif // PLATFORM(IOS)
@@ -1599,14 +1576,10 @@ JSClassRef AccessibilityUIElement::getJSClass()
         { "startTextMarker", startTextMarkerCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "endTextMarker", endTextMarkerCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
 #if PLATFORM(IOS)
-        { "iphoneLabel", getIPhoneLabelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "iphoneHint", getIPhoneHintCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "iphoneValue", getIPhoneValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "iphoneIdentifier", getIPhoneIdentifierCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "iphoneTraits", getIPhoneTraitsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "iphoneIsElement", getIPhoneIsElementCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "iphoneElementTextPosition", getIPhoneElementTextPositionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "iphoneElementTextLength", getIPhoneElementTextLengthCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "identifier", getIdentifierCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "traits", getTraitsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "elementTextPosition", getElementTextPositionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "elementTextLength", getElementTextLengthCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "stringForSelection", stringForSelectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
 #endif // PLATFORM(IOS)
 #if PLATFORM(MAC) && !PLATFORM(IOS)
index 8e6457a1356116c055201a529cd039bb783d9ac2..8cf762e2b585695a5a5f737527e50581b9f8264f 100644 (file)
@@ -274,14 +274,10 @@ public:
     void removeNotificationListener();
     
 #if PLATFORM(IOS)
-    JSStringRef iphoneLabel();
-    JSStringRef iphoneValue();
-    JSStringRef iphoneTraits();
-    JSStringRef iphoneHint();
-    JSStringRef iphoneIdentifier();
-    bool iphoneIsElement();
-    int iphoneElementTextPosition();
-    int iphoneElementTextLength();
+    JSStringRef traits();
+    JSStringRef identifier();
+    int elementTextPosition();
+    int elementTextLength();
     AccessibilityUIElement headerElementAtIndex(unsigned);
     // This will simulate the accessibilityDidBecomeFocused API in UIKit.
     void assistiveTechnologySimulatedFocus();
@@ -300,9 +296,7 @@ private:
     static JSClassRef getJSClass();
     PlatformUIElement m_element;
     
-#if PLATFORM(IOS) 
-    JSObjectRef m_notificationFunctionCallback;
-#elif PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // A retained, platform specific object used to help manage notifications for this object.
     NotificationHandler m_notificationHandler;
 #endif
index 2be357d2f2e93d4034f9eb2ad36160d0a29fb5a5..362f6c54172ffcbedb7ff5ea783292d194d67b15 100644 (file)
@@ -28,6 +28,7 @@
 #import "AccessibilityUIElement.h"
 
 #import "AccessibilityCommonMac.h"
+#import "AccessibilityNotificationHandler.h"
 #import <Foundation/Foundation.h>
 #import <JavaScriptCore/JSRetainPtr.h>
 #import <JavaScriptCore/JSStringRef.h>
@@ -78,6 +79,7 @@ AccessibilityUIElement::~AccessibilityUIElement()
 - (CGFloat)_accessibilityMaxValue;
 - (void)_accessibilitySetValue:(NSString *)value;
 - (void)_accessibilityActivate;
+- (UIAccessibilityTraits)_axSelectedTrait;
 @end
 
 @interface NSObject (WebAccessibilityObjectWrapperPrivate)
@@ -100,43 +102,23 @@ static JSStringRef concatenateAttributeAndValue(NSString* attribute, NSString* v
 
 #pragma mark iPhone Attributes
 
-JSStringRef AccessibilityUIElement::iphoneLabel()
-{
-    return concatenateAttributeAndValue(@"AXLabel", [m_element accessibilityLabel]);
-}
-
-JSStringRef AccessibilityUIElement::iphoneHint()
-{
-    return concatenateAttributeAndValue(@"AXHint", [m_element accessibilityHint]);
-}
-
-JSStringRef AccessibilityUIElement::iphoneValue()
-{
-    return concatenateAttributeAndValue(@"AXValue", [m_element accessibilityValue]);
-}
-
-JSStringRef AccessibilityUIElement::iphoneIdentifier()
+JSStringRef AccessibilityUIElement::identifier()
 {
     return concatenateAttributeAndValue(@"AXIdentifier", [m_element accessibilityIdentifier]);
 }
 
-JSStringRef AccessibilityUIElement::iphoneTraits()
+JSStringRef AccessibilityUIElement::traits()
 {
     return concatenateAttributeAndValue(@"AXTraits", [NSString stringWithFormat:@"%qu", [m_element accessibilityTraits]]);
 }
 
-bool AccessibilityUIElement::iphoneIsElement()
-{
-    return [m_element isAccessibilityElement];
-}
-
-int AccessibilityUIElement::iphoneElementTextPosition()
+int AccessibilityUIElement::elementTextPosition()
 {
     NSRange range = [[m_element valueForKey:@"elementTextRange"] rangeValue];
     return range.location;
 }
 
-int AccessibilityUIElement::iphoneElementTextLength()
+int AccessibilityUIElement::elementTextLength()
 {
     NSRange range = [[m_element valueForKey:@"elementTextRange"] rangeValue];
     return range.length;    
@@ -490,8 +472,8 @@ JSStringRef AccessibilityUIElement::title()
 
 JSStringRef AccessibilityUIElement::description()
 {
-    return JSStringCreateWithCharacters(0, 0);
-}    
+    return concatenateAttributeAndValue(@"AXLabel", [m_element accessibilityLabel]);
+}
 
 JSStringRef AccessibilityUIElement::orientation() const
 {
@@ -500,7 +482,7 @@ JSStringRef AccessibilityUIElement::orientation() const
 
 JSStringRef AccessibilityUIElement::stringValue()
 {
-    return JSStringCreateWithCharacters(0, 0);
+    return concatenateAttributeAndValue(@"AXValue", [m_element accessibilityValue]);
 }
 
 JSStringRef AccessibilityUIElement::language()
@@ -510,7 +492,7 @@ JSStringRef AccessibilityUIElement::language()
 
 JSStringRef AccessibilityUIElement::helpText() const
 {
-    return JSStringCreateWithCharacters(0, 0);
+    return concatenateAttributeAndValue(@"AXHint", [m_element accessibilityHint]);
 }
 
 double AccessibilityUIElement::intValue() const
@@ -562,7 +544,8 @@ bool AccessibilityUIElement::isFocused() const
 bool AccessibilityUIElement::isSelected() const
 {
     UIAccessibilityTraits traits = [m_element accessibilityTraits];
-    return (traits & UIAccessibilityTraitSelected);
+    bool result = (traits & [m_element _axSelectedTrait]) == [m_element _axSelectedTrait];
+    return result;
 }
 
 bool AccessibilityUIElement::isExpanded() const
@@ -724,32 +707,31 @@ JSStringRef AccessibilityUIElement::documentURI()
     return JSStringCreateWithCharacters(0, 0);
 }
 
-static void _accessibilityNotificationCallback(id element, NSString* notification, void* context)
-{
-    if (!context)
-        return;
-    
-    JSObjectRef functionCallback = static_cast<JSObjectRef>(context);
-    
-    JSRetainPtr<JSStringRef> jsNotification(Adopt, [notification createJSStringRef]);
-    JSValueRef argument = JSValueMakeString([mainFrame globalContext], jsNotification.get());
-    JSObjectCallAsFunction([mainFrame globalContext], functionCallback, NULL, 1, &argument, NULL);
-}
-
 bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
 {
     if (!functionCallback)
         return false;
     
-    m_notificationFunctionCallback = functionCallback;
-    [platformUIElement() accessibilitySetPostedNotificationCallback:_accessibilityNotificationCallback withContext:reinterpret_cast<void*>(m_notificationFunctionCallback)];
-    return true;    
+    // iOS programmers should not be adding more than one notification listener per element.
+    // Other platforms may be different.
+    if (m_notificationHandler)
+        return false;
+    m_notificationHandler = [[AccessibilityNotificationHandler alloc] init];
+    [m_notificationHandler setPlatformElement:platformUIElement()];
+    [m_notificationHandler setCallback:functionCallback];
+    [m_notificationHandler startObserving];
+    
+    return true;
 }
 
 void AccessibilityUIElement::removeNotificationListener()
 {
-    m_notificationFunctionCallback = 0;
-    [platformUIElement() accessibilitySetPostedNotificationCallback:nil withContext:nil];
+    // iOS programmers should not be trying to remove a listener that's already removed.
+    ASSERT(m_notificationHandler);
+    
+    [m_notificationHandler stopObserving];
+    [m_notificationHandler release];
+    m_notificationHandler = nil;
 }
 
 bool AccessibilityUIElement::isFocusable() const
@@ -796,8 +778,7 @@ bool AccessibilityUIElement::isCollapsed() const
 
 bool AccessibilityUIElement::isIgnored() const
 {
-    // FIXME: implement
-    return false;
+    return ![m_element isAccessibilityElement];
 }
 
 bool AccessibilityUIElement::hasPopup() const
index 56f6c6e8ae099bb6b8825992438b327d4bea89ab..37f7265f834c6254ef050e5804095512ee454524 100644 (file)
@@ -53,6 +53,21 @@ bool AccessibilityUIElement::isValid() const
     return m_element;            
 }
 
+// iOS specific methods
+#if !PLATFORM(IOS)
+JSRetainPtr<JSStringRef> AccessibilityUIElement::identifier() { return nullptr; }
+JSRetainPtr<JSStringRef> AccessibilityUIElement::traits() { return nullptr; }
+int AccessibilityUIElement::elementTextPosition() { return 0; }
+int AccessibilityUIElement::elementTextLength() { return 0; }
+JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForSelection() { return nullptr; }
+JSValueRef AccessibilityUIElement::elementsForRange(unsigned, unsigned) { return nullptr; }
+void AccessibilityUIElement::increaseTextSelection() { }
+void AccessibilityUIElement::decreaseTextSelection() { }
+PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::linkedElement() { return nullptr; }
+PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::headerElementAtIndex(unsigned) { return nullptr; }
+void AccessibilityUIElement::assistiveTechnologySimulatedFocus() { return; }
+#endif
+    
 // Unsupported methods on various platforms. As they're implemented on other platforms this list should be modified.
 #if (!PLATFORM(GTK) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY)
 JSRetainPtr<JSStringRef> AccessibilityUIElement::characterAtOffset(int) { return 0; }
index 98ed45b91b0d234b342bd928b287a924fb1032b6..24850b2196ae11d27251020a9728896f4cc85274 100644 (file)
@@ -263,6 +263,18 @@ public:
     // Make sure you call remove, because you can't rely on objects being deallocated in a timely fashion.
     bool removeNotificationListener();
     
+    JSRetainPtr<JSStringRef> identifier();
+    JSRetainPtr<JSStringRef> traits();
+    int elementTextPosition();
+    int elementTextLength();
+    JSRetainPtr<JSStringRef> stringForSelection();
+    JSValueRef elementsForRange(unsigned location, unsigned length);
+    void increaseTextSelection();
+    void decreaseTextSelection();
+    PassRefPtr<AccessibilityUIElement> linkedElement();
+    PassRefPtr<AccessibilityUIElement> headerElementAtIndex(unsigned index);
+    void assistiveTechnologySimulatedFocus();
+    
 private:
     AccessibilityUIElement(PlatformUIElement);
     AccessibilityUIElement(const AccessibilityUIElement&);
index 57f856745d957763641ad9e8bc3769f6d2c5603c..80de73815177f0da0578842c8cabebcb15373de5 100644 (file)
@@ -201,7 +201,21 @@ interface AccessibilityUIElement {
     readonly attribute DOMString mathPrescriptsDescription;
 
     readonly attribute DOMString pathDescription;
-    
+
+    // iOS specific accessibility methods.
+    readonly attribute DOMString identifier;
+    readonly attribute DOMString traits;
+    readonly attribute int elementTextPosition;
+    readonly attribute int elementTextLength;
+    readonly attribute DOMString stringForSelection;
+    object elementsForRange(unsigned long location, unsigned long length);
+    void increaseTextSelection();
+    void decreaseTextSelection();
+    AccessibilityUIElement linkedElement();
+    AccessibilityUIElement headerElementAtIndex(unsigned long index);
+    // This will simulate the accessibilityDidBecomeFocused API in UIKit.
+    void assistiveTechnologySimulatedFocus();
+
     // Notification support.
     boolean addNotificationListener(object callbackFunction);
     boolean removeNotificationListener();
index 8f9c4e01c857c261c1194ad20b3edae8a1c21e4d..91f02184819e18d4052c110a04a3522455be14a8 100644 (file)
@@ -68,7 +68,18 @@ void AccessibilityController::resetToConsistentState()
 
 static id findAccessibleObjectById(id obj, NSString *idAttribute)
 {
-    return 0;
+    id objIdAttribute = [obj accessibilityIdentifier];
+    if ([objIdAttribute isKindOfClass:[NSString class]] && [objIdAttribute isEqualToString:idAttribute])
+        return obj;
+    
+    NSUInteger childrenCount = [obj accessibilityElementCount];
+    for (NSUInteger i = 0; i < childrenCount; ++i) {
+        id result = findAccessibleObjectById([obj accessibilityElementAtIndex:i], idAttribute);
+        if (result)
+            return result;
+    }
+    
+    return nil;
 }
 
 PassRefPtr<AccessibilityUIElement> AccessibilityController::accessibleElementById(JSStringRef idAttribute)
index a0f981de7c3b26034d6de682c3f73f44b845e4c4..48d64c19d5b54cc69b880725fc73e54c69e06a95 100644 (file)
 #import "AccessibilityUIElement.h"
 #import "InjectedBundle.h"
 #import "InjectedBundlePage.h"
+#import <Foundation/Foundation.h>
+#import <JavaScriptCore/JSRetainPtr.h>
+#import <JavaScriptCore/JSStringRef.h>
+#import <JavaScriptCore/JSStringRefCF.h>
 #import <UIKit/UIKit.h>
+#import <WebCore/TextGranularity.h>
+#import <WebKit/WKBundleFrame.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/Vector.h>
+
+typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
+
+@interface NSObject (UIAccessibilityHidden)
+- (id)accessibilityHitTest:(CGPoint)point;
+- (id)accessibilityLinkedElement;
+- (NSRange)accessibilityColumnRange;
+- (NSRange)accessibilityRowRange;
+- (id)accessibilityElementForRow:(NSInteger)row andColumn:(NSInteger)column;
+- (NSURL *)accessibilityURL;
+- (NSArray *)accessibilityHeaderElements;
+- (NSString *)accessibilityPlaceholderValue;
+- (NSString *)stringForRange:(NSRange)range;
+- (NSArray *)elementsForRange:(NSRange)range;
+- (NSString *)selectionRangeString;
+- (CGPoint)accessibilityClickPoint;
+- (void)accessibilityModifySelection:(WebCore::TextGranularity)granularity increase:(BOOL)increase;
+- (void)accessibilitySetPostedNotificationCallback:(AXPostedNotificationCallback)function withContext:(void*)context;
+- (CGFloat)_accessibilityMinValue;
+- (CGFloat)_accessibilityMaxValue;
+- (void)_accessibilitySetValue:(NSString *)value;
+- (void)_accessibilityActivate;
+- (UIAccessibilityTraits)_axSelectedTrait;
+@end
+
+@interface NSObject (WebAccessibilityObjectWrapperPrivate)
+- (CGPathRef)_accessibilityPath;
+@end
+
+@implementation NSString (JSStringRefAdditions)
+
++ (NSString *)stringWithJSStringRef:(JSStringRef)jsStringRef
+{
+    if (!jsStringRef)
+        return nil;
+    
+    CFStringRef cfString = JSStringCopyCFString(kCFAllocatorDefault, jsStringRef);
+    return [(NSString *)cfString autorelease];
+}
+
+- (JSStringRef)createJSStringRef
+{
+    return JSStringCreateWithCFString((CFStringRef)self);
+}
+
+@end
 
 namespace WTR {
 
+static void convertNSArrayToVector(NSArray* array, Vector<RefPtr<AccessibilityUIElement> >& elementVector)
+{
+    NSUInteger count = [array count];
+    for (NSUInteger i = 0; i < count; ++i)
+        elementVector.append(AccessibilityUIElement::create([array objectAtIndex:i]));
+}    
+
+static JSStringRef concatenateAttributeAndValue(NSString* attribute, NSString* value)
+{
+    Vector<UniChar> buffer([attribute length]);
+    [attribute getCharacters:buffer.data()];
+    buffer.append(':');
+    buffer.append(' ');
+    
+    Vector<UniChar> valueBuffer([value length]);
+    [value getCharacters:valueBuffer.data()];
+    buffer.appendVector(valueBuffer);
+    
+    return JSStringCreateWithCharacters(buffer.data(), buffer.size());
+}
+    
 AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
     : m_element(element)
 {
@@ -58,6 +133,24 @@ bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
     return platformUIElement() == otherElement->platformUIElement();
 }
 
+PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::headerElementAtIndex(unsigned index)
+{
+    NSArray *headers = [m_element accessibilityHeaderElements];
+    if (index < [headers count])
+        return AccessibilityUIElement::create([headers objectAtIndex:index]);
+    
+    return nullptr;
+}
+
+PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::linkedElement()
+{
+    id linkedElement = [m_element accessibilityLinkedElement];
+    if (linkedElement)
+        return AccessibilityUIElement::create(linkedElement);
+    
+    return nullptr;
+}
+
 void AccessibilityUIElement::getLinkedUIElements(Vector<RefPtr<AccessibilityUIElement> >& elementVector)
 {
 }
@@ -90,7 +183,33 @@ int AccessibilityUIElement::childrenCount()
 
 PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::elementAtPoint(int x, int y)
 {
-    return 0;
+    id element = [m_element accessibilityHitTest:CGPointMake(x, y)];
+    if (!element)
+        return nil;
+    
+    return AccessibilityUIElement::create(element);
+}
+    
+static JSValueRef convertElementsToObjectArray(JSContextRef context, Vector<RefPtr<AccessibilityUIElement>>& elements)
+{
+    JSValueRef arrayResult = JSObjectMakeArray(context, 0, nullptr, nullptr);
+    JSObjectRef arrayObj = JSValueToObject(context, arrayResult, nullptr);
+    size_t elementCount = elements.size();
+    for (size_t i = 0; i < elementCount; ++i)
+        JSObjectSetPropertyAtIndex(context, arrayObj, i, JSObjectMake(context, elements[i]->wrapperClass(), elements[i].get()), nullptr);
+    
+    return arrayResult;
+}
+
+JSValueRef AccessibilityUIElement::elementsForRange(unsigned location, unsigned length)
+{
+    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::singleton().page()->page());
+    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
+
+    NSArray *elementsForRange = [m_element elementsForRange:NSMakeRange(location, length)];
+    Vector<RefPtr<AccessibilityUIElement>> elements;
+    convertNSArrayToVector(elementsForRange, elements);
+    return convertElementsToObjectArray(context, elements);
 }
 
 unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
@@ -190,6 +309,9 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::allAttributes()
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
 {
+    if (JSStringIsEqualToUTF8CString(attribute, "AXPlaceholderValue"))
+        return [[m_element accessibilityPlaceholderValue] createJSStringRef];
+    
     return JSStringCreateWithCharacters(0, 0);
 }
 
@@ -266,7 +388,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::title()
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::description()
 {
-    return JSStringCreateWithCharacters(0, 0);
+    return concatenateAttributeAndValue(@"AXLabel", [m_element accessibilityLabel]);
 }
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::orientation() const
@@ -276,7 +398,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::orientation() const
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::stringValue()
 {
-    return JSStringCreateWithCharacters(0, 0);
+    return concatenateAttributeAndValue(@"AXValue", [m_element accessibilityValue]);
 }
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::language()
@@ -286,7 +408,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::language()
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
 {
-    return JSStringCreateWithCharacters(0, 0);
+    return concatenateAttributeAndValue(@"AXHint", [m_element accessibilityHint]);
 }
 
 double AccessibilityUIElement::x()
@@ -315,12 +437,12 @@ double AccessibilityUIElement::height()
 
 double AccessibilityUIElement::clickPointX()
 {
-    return 0;
+    return [m_element accessibilityClickPoint].x;
 }
 
 double AccessibilityUIElement::clickPointY()
 {
-    return 0;
+    return [m_element accessibilityClickPoint].y;
 }
 
 double AccessibilityUIElement::intValue() const
@@ -330,14 +452,15 @@ double AccessibilityUIElement::intValue() const
 
 double AccessibilityUIElement::minValue()
 {
-    return 0;
+    return [m_element _accessibilityMinValue];
 }
 
 double AccessibilityUIElement::maxValue()
 {
-    return 0;
+    return [m_element _accessibilityMaxValue];
 }
 
+
 JSRetainPtr<JSStringRef> AccessibilityUIElement::valueDescription()
 {
     return JSStringCreateWithCharacters(0, 0);
@@ -382,7 +505,7 @@ bool AccessibilityUIElement::isFocused() const
 bool AccessibilityUIElement::isSelected() const
 {
     UIAccessibilityTraits traits = [m_element accessibilityTraits];
-    return (traits & UIAccessibilityTraitSelected);
+    return (traits & [m_element _axSelectedTrait]) == [m_element _axSelectedTrait];
 }
 
 bool AccessibilityUIElement::isSelectedOptionActive() const
@@ -455,7 +578,11 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::boundsForRange(unsigned locatio
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForRange(unsigned location, unsigned length)
 {
-    return JSStringCreateWithCharacters(0, 0);
+    NSString *stringForRange = [m_element stringForRange:NSMakeRange(location, length)];
+    if (!stringForRange)
+        return nullptr;
+    
+    return [stringForRange createJSStringRef];
 }
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::attributedStringForRange(unsigned location, unsigned length)
@@ -513,6 +640,16 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::attributesOfHeader()
     return JSStringCreateWithCharacters(0, 0);
 }
 
+JSRetainPtr<JSStringRef> AccessibilityUIElement::traits()
+{
+    return concatenateAttributeAndValue(@"AXTraits", [NSString stringWithFormat:@"%qu", [m_element accessibilityTraits]]);
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::identifier()
+{
+    return concatenateAttributeAndValue(@"AXIdentifier", [m_element accessibilityIdentifier]);
+}
+
 int AccessibilityUIElement::rowCount()
 {
     return -1;
@@ -530,17 +667,21 @@ int AccessibilityUIElement::indexInTable()
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::rowIndexRange()
 {
-    return JSStringCreateWithCharacters(0, 0);
+    NSRange range = [m_element accessibilityRowRange];
+    NSMutableString* rangeDescription = [NSMutableString stringWithFormat:@"{%lu, %lu}", (unsigned long)range.location, (unsigned long)range.length];
+    return [rangeDescription createJSStringRef];
 }
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::columnIndexRange()
 {
-    return JSStringCreateWithCharacters(0, 0);
+    NSRange range = [m_element accessibilityColumnRange];
+    NSMutableString* rangeDescription = [NSMutableString stringWithFormat:@"{%lu, %lu}", (unsigned long)range.location, (unsigned long)range.length];
+    return [rangeDescription createJSStringRef];
 }
 
 PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::cellForColumnAndRow(unsigned col, unsigned row)
 {
-    return 0;
+    return AccessibilityUIElement::create([m_element accessibilityElementForRow:row andColumn:col]);
 }
 
 PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::horizontalScrollbar() const
@@ -610,19 +751,75 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::documentURI()
     return JSStringCreateWithCharacters(0, 0);
 }
 
+void AccessibilityUIElement::assistiveTechnologySimulatedFocus()
+{
+    [m_element accessibilityElementDidBecomeFocused];
+}
+
+void AccessibilityUIElement::increaseTextSelection()
+{
+    [m_element accessibilityModifySelection:WebCore::CharacterGranularity increase:YES];
+}
+
+void AccessibilityUIElement::decreaseTextSelection()
+{
+    [m_element accessibilityModifySelection:WebCore::CharacterGranularity increase:NO];
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForSelection()
+{
+    NSString *stringForRange = [m_element selectionRangeString];
+    if (!stringForRange)
+        return nullptr;
+    
+    return [stringForRange createJSStringRef];
+}
+    
+int AccessibilityUIElement::elementTextPosition()
+{
+    NSRange range = [[m_element valueForKey:@"elementTextRange"] rangeValue];
+    return range.location;
+}
+
+int AccessibilityUIElement::elementTextLength()
+{
+    NSRange range = [[m_element valueForKey:@"elementTextRange"] rangeValue];
+    return range.length;    
+}
+    
 JSRetainPtr<JSStringRef> AccessibilityUIElement::url()
 {
-    return JSStringCreateWithCharacters(0, 0);
+    NSURL *url = [m_element accessibilityURL];
+    return [[url absoluteString] createJSStringRef];
 }
 
 bool AccessibilityUIElement::addNotificationListener(JSValueRef functionCallback)
 {
-    return false;
+    if (!functionCallback)
+        return false;
+    
+    // iOS programmers should not be adding more than one notification listener per element.
+    // Other platforms may be different.
+    if (m_notificationHandler)
+        return false;
+    m_notificationHandler = [[AccessibilityNotificationHandler alloc] init];
+    [m_notificationHandler setPlatformElement:platformUIElement()];
+    [m_notificationHandler setCallback:functionCallback];
+    [m_notificationHandler startObserving];
+    
+    return true;
 }
 
 bool AccessibilityUIElement::removeNotificationListener()
 {
-    return false;
+    // iOS programmers should not be trying to remove a listener that's already removed.
+    ASSERT(m_notificationHandler);
+    
+    [m_notificationHandler stopObserving];
+    [m_notificationHandler release];
+    m_notificationHandler = nil;
+    
+    return true;
 }
 
 bool AccessibilityUIElement::isFocusable() const
@@ -662,7 +859,8 @@ bool AccessibilityUIElement::isCollapsed() const
 
 bool AccessibilityUIElement::isIgnored() const
 {
-    return false;
+    bool isAccessibilityElement = [m_element isAccessibilityElement];
+    return !isAccessibilityElement;
 }
 
 bool AccessibilityUIElement::hasPopup() const
@@ -796,9 +994,36 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPrescriptsDescription() con
     return 0;
 }
 
+static void _CGPathEnumerationIteration(void *info, const CGPathElement *element)
+{
+    NSMutableString *result = (NSMutableString *)info;
+    switch (element->type) {
+    case kCGPathElementMoveToPoint:
+        [result appendString:@"\tMove to point\n"];
+        break;
+    case kCGPathElementAddLineToPoint:
+        [result appendString:@"\tLine to\n"];
+        break;
+    case kCGPathElementAddQuadCurveToPoint:
+        [result appendString:@"\tQuad curve to\n"];
+        break;
+    case kCGPathElementAddCurveToPoint:
+        [result appendString:@"\tCurve to\n"];
+        break;
+    case kCGPathElementCloseSubpath:
+        [result appendString:@"\tClose\n"];
+        break;
+    }
+}
+
 JSRetainPtr<JSStringRef> AccessibilityUIElement::pathDescription() const
 {
-    return 0;
+    NSMutableString *result = [NSMutableString stringWithString:@"\nStart Path\n"];
+    CGPathRef pathRef = [m_element _accessibilityPath];
+    
+    CGPathApply(pathRef, result, _CGPathEnumerationIteration);
+    
+    return [result createJSStringRef];
 }
 
 JSRetainPtr<JSStringRef> AccessibilityUIElement::supportedActions() const