Bug 109028
| Summary: | mac-wk2 test runner returns null for accessibilityController.accessibleElementById | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | James Craig <jcraig> |
| Component: | Accessibility | Assignee: | Nobody <webkit-unassigned> |
| Status: | CLOSED WORKSFORME | ||
| Severity: | Normal | CC: | cfleizach, jcraig |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
James Craig
mac-wk2 test runner returns null for accessibilityController.accessibleElementById
* REPRO
role-subrole-decription.html layout test runs as expected when run as webkit1.
run-webkit-tests LayoutTests/platform/mac/accessibility/role-subrole-roledescription.html
The test ran as expected.
But when run as wk2 (run-layout-tests -2), it throws the following error:
$ run-webkit-tests -2 LayoutTests/platform/mac/accessibility/role-subrole-roledescription.html
CONSOLE MESSAGE: line 299: TypeError: 'null' is not an object (evaluating 'axElement.role')
FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined).
It appears to me that accessibilityController.accessibleElementById is not returning the right value.
Note: the referenced layout test is in a patch for: http://webkit.org/b/109027
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
chris fleizach
I think your problem is that
PASS: div[role=rowgroup]
923 AXRole:
924
has no role, and in WK2, it returns a null object instead of an empty string
James Craig
Not quite. The axElement actually returns null, not just the properties on the object. Nevertheless, I can work around it like this to normalize the behavior between wk1 and wk2.
if (axElement) {
role = axElement.role;
subrole = axElement.subrole;
roleDescription = axElement.roleDescription;
} else {
role = 'AXRole: ';
subrole = 'AXSubrole: ';
roleDescription = 'AXRoleDescription: ';
}
If you think that's expected behavior, it's okay to close this bug.
chris fleizach
(In reply to comment #2)
> Not quite. The axElement actually returns null, not just the properties on the object. Nevertheless, I can work around it like this to normalize the behavior between wk1 and wk2.
>
> if (axElement) {
> role = axElement.role;
> subrole = axElement.subrole;
> roleDescription = axElement.roleDescription;
> } else {
> role = 'AXRole: ';
> subrole = 'AXSubrole: ';
> roleDescription = 'AXRoleDescription: ';
> }
>
> If you think that's expected behavior, it's okay to close this bug.
Ah yes, because this is not an AX element in the hierarchy. In WK1, you'll get an empty ax element, on WK2 you'll get a null element.
We could leave this out of the test
or do a check like
if (axElement && axElement.role)
James Craig
Closing