Bug 148516 - AX: Fix accessibility/select-element-at-index.html test
Summary: AX: Fix accessibility/select-element-at-index.html test
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-26 23:31 PDT by Nan Wang
Modified: 2015-08-27 12:21 PDT (History)
11 users (show)

See Also:


Attachments
patch (19.74 KB, patch)
2015-08-26 23:46 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (19.74 KB, patch)
2015-08-26 23:56 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (19.75 KB, patch)
2015-08-27 00:06 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (16.25 KB, patch)
2015-08-27 10:56 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (16.47 KB, patch)
2015-08-27 11:20 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (17.84 KB, patch)
2015-08-27 12:04 PDT, Nan Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2015-08-26 23:31:06 PDT
Test is marked skip in TestExpectation file.
Comment 1 Nan Wang 2015-08-26 23:46:45 PDT
Created attachment 260042 [details]
patch
Comment 2 Nan Wang 2015-08-26 23:56:24 PDT
Created attachment 260043 [details]
patch
Comment 3 Nan Wang 2015-08-27 00:06:50 PDT
Created attachment 260045 [details]
patch
Comment 4 chris fleizach 2015-08-27 00:16:30 PDT
Comment on attachment 260045 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=260045&action=review

> Tools/DumpRenderTree/AccessibilityUIElement.cpp:487
> +    int indexNumber = -1;

can we make this unsigned then we don't have to worry about >= 0

> Tools/DumpRenderTree/AccessibilityUIElement.cpp:498
> +    int indexNumber = -1;

ditto

> Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm:1408
> +    NSArray* selected = [m_element accessibilityAttributeValue:NSAccessibilitySelectedChildrenAttribute];

* is on wrong side because this is ObjC code. 
selected -> selectedChildren

> Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm:1409
> +    NSArray* array = [NSArray arrayWithObject:element.platformUIElement()];

ditto about *

> Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm:1420
> +    NSArray* selected = [m_element accessibilityAttributeValue:NSAccessibilitySelectedChildrenAttribute];

ditto

> Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm:1423
> +    NSMutableArray* array = [NSMutableArray arrayWithArray:selected];

ditto

> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1448
> +    NSArray* array = [NSArray arrayWithObject:element->platformUIElement()];

ditto

> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1459
> +    NSArray* selected = [m_element accessibilityAttributeValue:NSAccessibilitySelectedChildrenAttribute];

ditto

> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1464
> +    [m_element accessibilitySetValue:array forAttribute:NSAccessibilitySelectedChildrenAttribute];

i see that when we use this it performs it async which makes testing hard. there is a method

- (void)_accessibilitySetValue:(id)value forAttribute:(NSString*)attributeName

that is not async
Comment 5 Nan Wang 2015-08-27 10:56:52 PDT
Created attachment 260070 [details]
patch
Comment 6 chris fleizach 2015-08-27 11:07:03 PDT
Comment on attachment 260070 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=260070&action=review

> LayoutTests/accessibility/select-element-at-index.html:48
> +        if (accessibilityController.platformName == "mac") 

can you add a comment why this is necessary
Comment 7 Nan Wang 2015-08-27 11:20:19 PDT
Created attachment 260072 [details]
patch
Comment 8 Nan Wang 2015-08-27 12:04:51 PDT
Created attachment 260075 [details]
patch

Fix iOS build failure
Comment 9 WebKit Commit Bot 2015-08-27 12:21:46 PDT
Comment on attachment 260075 [details]
patch

Clearing flags on attachment: 260075

Committed r189044: <http://trac.webkit.org/changeset/189044>
Comment 10 WebKit Commit Bot 2015-08-27 12:21:51 PDT
All reviewed patches have been landed.  Closing bug.