Bug 120032

Summary: Add DRT test to ensure that AccessibilityObject::stringValue() of <input type="file"> is meaningful
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, buildbot, cfleizach, commit-queue, dmazzoni, jdiggs, mario, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Layout test
cfleizach: review+, buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 none

Description Daniel Bates 2013-08-19 16:02:43 PDT
We should add a test to ensure that the accessibility string value (AccessibilityObject::stringValue()) for an <input type="file"> is a non-empty string.
Comment 1 Daniel Bates 2013-08-19 16:10:07 PDT
Created attachment 209134 [details]
Layout test
Comment 2 chris fleizach 2013-08-19 16:17:03 PDT
Comment on attachment 209134 [details]
Layout test

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

thanks. a few minor changes suggested

> LayoutTests/accessibility/file-upload-button-stringvalue-expected.txt:7
> +PASS accessibilityController.accessibleElementById('singleFileUpload').stringValue is "AXValue: no file selected"

this result should probably move into the mac platform/accessibility

> LayoutTests/accessibility/file-upload-button-stringvalue.html:25
> +    shouldBeEqualToString("accessibilityController.accessibleElementById('singleFileUpload').stringValue", "AXValue: no file selected");

It might be better to do a debug() statement instead of the equalToString so that other platforms will get what they're expecting which may not include 'AXValue'
Comment 3 Daniel Bates 2013-08-19 16:47:24 PDT
Comment on attachment 209134 [details]
Layout test

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

>> LayoutTests/accessibility/file-upload-button-stringvalue-expected.txt:7
>> +PASS accessibilityController.accessibleElementById('singleFileUpload').stringValue is "AXValue: no file selected"
> 
> this result should probably move into the mac platform/accessibility

Will change test to emit results instead of using a PASS/FAIL style test and will add Mac-specific expected results. For completeness, many tests in LayoutTests/accessibility compare to strings that are prefixed with "AXValue", "AXRole", et cetera. We should look to remove such Apple-specific references and/or move such tests to LayoutTests/platform/mac/accessibility. We can do such work in a separate bug.

>> LayoutTests/accessibility/file-upload-button-stringvalue.html:25
>> +    shouldBeEqualToString("accessibilityController.accessibleElementById('singleFileUpload').stringValue", "AXValue: no file selected");
> 
> It might be better to do a debug() statement instead of the equalToString so that other platforms will get what they're expecting which may not include 'AXValue'

Will change test to emit results instead of using a PASS/FAIL style test.
Comment 4 chris fleizach 2013-08-19 16:56:10 PDT
Comment on attachment 209134 [details]
Layout test

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

>>> LayoutTests/accessibility/file-upload-button-stringvalue-expected.txt:7
>>> +PASS accessibilityController.accessibleElementById('singleFileUpload').stringValue is "AXValue: no file selected"
>> 
>> this result should probably move into the mac platform/accessibility
> 
> Will change test to emit results instead of using a PASS/FAIL style test and will add Mac-specific expected results. For completeness, many tests in LayoutTests/accessibility compare to strings that are prefixed with "AXValue", "AXRole", et cetera. We should look to remove such Apple-specific references and/or move such tests to LayoutTests/platform/mac/accessibility. We can do such work in a separate bug.

yea it's a multi-year/platform effort to do so. we've been working on it slowly
Comment 5 Build Bot 2013-08-19 19:56:01 PDT
Comment on attachment 209134 [details]
Layout test

Attachment 209134 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1519281

New failing tests:
accessibility/file-upload-button-stringvalue.html
Comment 6 Build Bot 2013-08-19 19:56:03 PDT
Created attachment 209150 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.4
Comment 7 Daniel Bates 2013-08-20 09:49:28 PDT
Committed r154332: <http://trac.webkit.org/changeset/154332>
Comment 8 Daniel Bates 2013-08-20 14:44:06 PDT
Added GTK-specific expected results and committed them in <http://trac.webkit.org/changeset/154359>.