Commit 1169f4ca authored by dmazzoni@chromium.org's avatar dmazzoni@chromium.org

Update and rebaseline many DumpAccessibilityTree tests.

This re-enables several tests that were disabled, and
adds new expectations where they were missing before.
It also cleans up some tests by suppressing unnecessary
attributes, and makes the Mac "subrole" attribute hidden
by default since it's rarely useful.

The correctness of the output was determined by these specs:

HTML: http://www.w3.org/TR/html-aapi/
ARIA: http://www.w3.org/WAI/PF/aria-implementation/

BUG=165838
TBR=dtseng


Review URL: https://chromiumcodereview.appspot.com/11785038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175687 0039d316-1c4b-4281-b951-d872f2087c98
parent 2f9e1b55
...@@ -236,10 +236,7 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, ...@@ -236,10 +236,7 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
RunTest(FILE_PATH_LITERAL("aria-application.html")); RunTest(FILE_PATH_LITERAL("aria-application.html"));
} }
// Broken by http://trac.webkit.org/137512 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaCombobox) {
// Tracked in http://crbug.com/165838
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
DISABLED_AccessibilityAriaCombobox) {
RunTest(FILE_PATH_LITERAL("aria-combobox.html")); RunTest(FILE_PATH_LITERAL("aria-combobox.html"));
} }
...@@ -255,10 +252,7 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityButtonNameCalc) { ...@@ -255,10 +252,7 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityButtonNameCalc) {
RunTest(FILE_PATH_LITERAL("button-name-calc.html")); RunTest(FILE_PATH_LITERAL("button-name-calc.html"));
} }
// TODO(dmazzoni): rebaseline and enable after this WebKit change is rolled: IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityCanvas) {
// https://bugs.webkit.org/show_bug.cgi?id=96323
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
DISABLED_AccessibilityCanvas) {
RunTest(FILE_PATH_LITERAL("canvas.html")); RunTest(FILE_PATH_LITERAL("canvas.html"));
} }
...@@ -267,21 +261,12 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, ...@@ -267,21 +261,12 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
RunTest(FILE_PATH_LITERAL("checkbox-name-calc.html")); RunTest(FILE_PATH_LITERAL("checkbox-name-calc.html"));
} }
// TODO(dimich): Started to fail in Chrome r149732 (crbug 140397)
#if defined(OS_WIN)
#define MAYBE_AccessibilityContenteditableDescendants \
DISABLED_AccessibilityContenteditableDescendants
#else
#define MAYBE_AccessibilityContenteditableDescendants \
AccessibilityContenteditableDescendants
#endif
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityDiv) { IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityDiv) {
RunTest(FILE_PATH_LITERAL("div.html")); RunTest(FILE_PATH_LITERAL("div.html"));
} }
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
MAYBE_AccessibilityContenteditableDescendants) { AccessibilityContenteditableDescendants) {
RunTest(FILE_PATH_LITERAL("contenteditable-descendants.html")); RunTest(FILE_PATH_LITERAL("contenteditable-descendants.html"));
} }
...@@ -322,10 +307,8 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilitySpinButton) { ...@@ -322,10 +307,8 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilitySpinButton) {
RunTest(FILE_PATH_LITERAL("spinbutton.html")); RunTest(FILE_PATH_LITERAL("spinbutton.html"));
} }
// TODO(dmazzoni): rebaseline and enable after this WebKit change is rolled:
// https://bugs.webkit.org/show_bug.cgi?id=96323
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
DISABLED_AccessibilityToggleButton) { AccessibilityToggleButton) {
RunTest(FILE_PATH_LITERAL("togglebutton.html")); RunTest(FILE_PATH_LITERAL("togglebutton.html"));
} }
......
...@@ -32,7 +32,7 @@ string16 DumpAccessibilityTreeHelper::ToString(BrowserAccessibility* node, ...@@ -32,7 +32,7 @@ string16 DumpAccessibilityTreeHelper::ToString(BrowserAccessibility* node,
char* prefix) { char* prefix) {
StartLine(); StartLine();
Add(true, Format(node, "", @selector(role), "")); Add(true, Format(node, "", @selector(role), ""));
Add(true, Format(node, "subrole=", @selector(subrole), "")); Add(false, Format(node, "subrole=", @selector(subrole), ""));
Add(false, Format(node, "roleDescription='", Add(false, Format(node, "roleDescription='",
@selector(roleDescription), @selector(roleDescription),
"'")); "'"));
......
#<skip -- need to generate> AXWebArea title='' value=''
AXGroup title='' value=''
AXLink title='normal link' value=''
AXStaticText title='' value='normal link'
<!--
@WIN-ALLOW:LINKED
-->
<html> <html>
<style>a { text-decoration: underline; display: block; }</style> <style>a { text-decoration: underline; display: block; }</style>
<body> <body>
......
#<skip -- need to generate> AXWebArea title='' value='' description=''
AXGroup title='' value='' description=''
AXLink title='Link with image at start.' value='' description=''
AXImage title='' value='' description='Link'
AXStaticText title='' value=' with image at start.' description=''
AXLink title='Link with image in the middle.' value='' description=''
AXStaticText title='' value='Link with ' description=''
AXImage title='' value='' description='image'
AXStaticText title='' value=' in the middle.' description=''
AXLink title='Link with broken in the middle.' value='' description=''
AXStaticText title='' value='Link with ' description=''
AXImage title='' value='' description='broken'
AXStaticText title='' value=' in the middle.' description=''
AXLink title='Link with image at the end' value='' description=''
AXStaticText title='' value='Link with image at the ' description=''
AXImage title='' value='' description='end'
#<skip -- bug 120960> ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE
ROLE_SYSTEM_DOCUMENT name='' state=FOCUSED,READONLY,FOCUSABLE IA2_ROLE_SECTION name='' READONLY
IA2_ROLE_SECTION name='' state=READONLY ROLE_SYSTEM_LINK name='Link with image at start.' FOCUSABLE
ROLE_SYSTEM_LINK name='bullet Link with image at start.' state=FOCUSABLE,LINKED ROLE_SYSTEM_GRAPHIC name='Link' READONLY
ROLE_SYSTEM_GRAPHIC name='bullet' state=LINKED ROLE_SYSTEM_TEXT name=' with image at start.' READONLY
ROLE_SYSTEM_TEXT name='Link with image at start.' state=READONLY,LINKED ROLE_SYSTEM_LINK name='Link with image in the middle.' FOCUSABLE
ROLE_SYSTEM_LINK name='Link with image in the middle.' state=FOCUSABLE,LINKED ROLE_SYSTEM_TEXT name='Link with ' READONLY
ROLE_SYSTEM_TEXT name='Link with' state=READONLY,LINKED ROLE_SYSTEM_GRAPHIC name='image' READONLY
ROLE_SYSTEM_GRAPHIC name='image' state=LINKED ROLE_SYSTEM_TEXT name=' in the middle.' READONLY
ROLE_SYSTEM_TEXT name='in the middle.' state=READONLY,LINKED ROLE_SYSTEM_LINK name='Link with broken in the middle.' FOCUSABLE
ROLE_SYSTEM_LINK name='Link with broken image in the middle.' state=FOCUSABLE,LINKED ROLE_SYSTEM_TEXT name='Link with ' READONLY
ROLE_SYSTEM_TEXT name='Link with' state=READONLY,LINKED ROLE_SYSTEM_GRAPHIC name='broken' READONLY
ROLE_SYSTEM_GRAPHIC name='broken' state=LINKED ROLE_SYSTEM_TEXT name=' in the middle.' READONLY
ROLE_SYSTEM_TEXT name='in the middle.' state=READONLY,LINKED ROLE_SYSTEM_LINK name='Link with image at the end' FOCUSABLE
ROLE_SYSTEM_LINK name='Link with image at the end last' state=FOCUSABLE,LINKED ROLE_SYSTEM_TEXT name='Link with image at the ' READONLY
ROLE_SYSTEM_TEXT name='Link with image at the end ' state=READONLY,LINKED ROLE_SYSTEM_GRAPHIC name='end' READONLY
ROLE_SYSTEM_GRAPHIC name='last' state=LINKED
<!--
@MAC-ALLOW:description*
-->
<html> <html>
<body> <body>
<a href="http://www.google.com"><img src="bullet.png" alt="bullet"/>Link with image at start.</a> <a href="http://www.google.com"><img src="bullet.png" alt="Link"/> with image at start.</a>
<a href="http://www.google.com">Link with<img src="bullet.png" alt="image"/>in the middle.</a> <a href="http://www.google.com">Link with <img src="bullet.png" alt="image"/> in the middle.</a>
<a href="http://www.google.com">Link with<img src="broken.png" alt="broken"/>in the middle.</a> <a href="http://www.google.com">Link with <img src="broken.png" alt="broken"/> in the middle.</a>
<a href="http://www.google.com">Link with image at the end<img src="bullet.png" alt="last"/></a> <a href="http://www.google.com">Link with image at the <img src="bullet.png" alt="end"/></a>
</body> </body>
</html> </html>
<!-- <!--
@MAC-ALLOW:roleDescription='application' @MAC-ALLOW:roleDescription='application'
@MAC-ALLOW:subrole*
--> -->
<html> <html>
<body role="application" id="testAriaApplication"> <body role="application" id="testAriaApplication">
......
...@@ -2,7 +2,6 @@ AXWebArea title='' value='' ...@@ -2,7 +2,6 @@ AXWebArea title='' value=''
AXGroup title='' value='' AXGroup title='' value=''
AXStaticText title='' value='State' AXStaticText title='' value='State'
AXComboBox title='' value='' AXComboBox title='' value=''
AXList title='Alabama AXList title='' value=''
Alaska' value=''
AXStaticText title='Alabama' value='' AXStaticText title='Alabama' value=''
AXStaticText title='Alaska' value='' AXStaticText title='Alaska' value=''
...@@ -2,7 +2,6 @@ ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE ...@@ -2,7 +2,6 @@ ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE
IA2_ROLE_SECTION name='' READONLY IA2_ROLE_SECTION name='' READONLY
ROLE_SYSTEM_TEXT name='State' READONLY ROLE_SYSTEM_TEXT name='State' READONLY
ROLE_SYSTEM_COMBOBOX name='State' READONLY FOCUSABLE ROLE_SYSTEM_COMBOBOX name='State' READONLY FOCUSABLE
ROLE_SYSTEM_LIST name='Alabama ROLE_SYSTEM_LIST name=''
Alaska' FOCUSABLE ROLE_SYSTEM_LISTITEM name='Alabama' FOCUSABLE
ROLE_SYSTEM_LISTITEM name='Alabama' ROLE_SYSTEM_LISTITEM name='Alaska' FOCUSABLE
ROLE_SYSTEM_LISTITEM name='Alaska'
<!-- <!--
@MAC-DENY:subrole*
@WIN-DENY:description* @WIN-DENY:description*
--> -->
<html> <html>
...@@ -12,9 +11,9 @@ ...@@ -12,9 +11,9 @@
aria-owns="state_list" aria-owns="state_list"
aria-readonly="true" aria-readonly="true"
aria-activedescendant="state2"/> aria-activedescendant="state2"/>
<ul id="state_list" tabindex="-1" aria-expanded="true"> <ul id="state_list" role="listbox" aria-expanded="true">
<li id="state1" role="option">Alabama</li> <li id="state1" role="option" tabindex="-1">Alabama</li>
<li id="state2" role="option">Alaska</li> <li id="state2" role="option" tabindex="-1">Alaska</li>
</ul> </ul>
</body> </body>
</html> </html>
<!-- <!--
@MAC-ALLOW:description='File' @MAC-ALLOW:description='File'
@MAC-DENY:subrole*
@MAC-DENY:value* @MAC-DENY:value*
@WIN-DENY:description='' @WIN-DENY:description=''
--> -->
......
#<skip -- need to validate/generate> AXWebArea title='' description='' help=''
AXGroup title='' description='' help=''
AXButton title='InnerText0' description='' help=''
AXButton title='InnerText1' description='' help='Title1'
AXButton title='InnerText2' description='AriaLabel2' help='Title2'
AXButton title='InnerText3' description='LabelledBy3' help='Title3'
AXButton title='InnerText4' description='LabelledBy4' help='DescribedBy4'
AXButton title='InnerText5' description='' help='DescribedBy5'
<!-- <!--
@WIN-ALLOW:description* @WIN-ALLOW:description*
@MAC-ALLOW:description*
@MAC-ALLOW:help*
@MAC-DENY:value*
--> -->
<html> <html>
<body> <body>
......
AXWebArea subrole=(null) title='' value='' AXWebArea title='' value=''
AXGroup subrole=(null) title='' value='' AXGroup title='' value=''
AXImage subrole=(null) title='' value='' AXImage title='' value=''
AXStaticText subrole=(null) title='' value='' AXStaticText title='' value='Static fallback'
AXGroup subrole=(null) title='' value='' AXGroup title='' value=''
AXLink subrole=(null) title='' value='' AXLink title='Interactive fallback' value=''
AXStaticText subrole=(null) title='' value='' AXStaticText title='' value='Interactive fallback'
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
IA2_ROLE_SECTION READONLY IA2_ROLE_SECTION READONLY
ROLE_SYSTEM_GRAPHIC ROLE_SYSTEM_GRAPHIC
ROLE_SYSTEM_TEXT ROLE_SYSTEM_TEXT READONLY
IA2_ROLE_CANVAS IA2_ROLE_CANVAS
ROLE_SYSTEM_LINK FOCUSABLE ROLE_SYSTEM_LINK FOCUSABLE
ROLE_SYSTEM_TEXT ROLE_SYSTEM_TEXT READONLY
#<skip -- need to validate/generate> AXWebArea title='' description='' help=''
AXGroup title='' description='' help=''
AXCheckBox title='' description='Title0' help=''
AXCheckBox title='Label1' description='' help='Title1'
AXCheckBox title='' description='AriaLabel2' help='Title2'
AXCheckBox title='' description='LabelledBy3' help='Title3'
AXCheckBox title='' description='LabelledBy4' help='DescribedBy4'
AXCheckBox title='' description='' help='DescribedBy5'
<!-- <!--
@WIN-ALLOW:description* @WIN-ALLOW:description*
@MAC-ALLOW:description*
@MAC-ALLOW:help*
@MAC-DENY:value*
--> -->
<html> <html>
<body> <body>
......
ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE ROLE_SYSTEM_DOCUMENT name='' READONLY FOCUSABLE
IA2_ROLE_PARAGRAPH name='' IA2_STATE_EDITABLE IA2_ROLE_SECTION name='' FOCUSABLE IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name='Contentditable with ' IA2_STATE_EDITABLE IA2_ROLE_PARAGRAPH name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_LINK name='link' LINKED IA2_STATE_EDITABLE ROLE_SYSTEM_TEXT name='Contentditable with ' IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name='link' LINKED IA2_STATE_EDITABLE ROLE_SYSTEM_LINK name='link' LINKED IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name=' and ' IA2_STATE_EDITABLE ROLE_SYSTEM_TEXT name='link' LINKED IA2_STATE_EDITABLE
ROLE_SYSTEM_GRAPHIC name='image' IA2_STATE_EDITABLE ROLE_SYSTEM_TEXT name=' and ' IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name=' and ' IA2_STATE_EDITABLE ROLE_SYSTEM_GRAPHIC name='image' IA2_STATE_EDITABLE
ROLE_SYSTEM_PUSHBUTTON name='button' FOCUSABLE IA2_STATE_EDITABLE ROLE_SYSTEM_TEXT name=' and ' IA2_STATE_EDITABLE
ROLE_SYSTEM_TABLE name='' IA2_STATE_EDITABLE ROLE_SYSTEM_PUSHBUTTON name='button' FOCUSABLE IA2_STATE_EDITABLE
ROLE_SYSTEM_ROW name='' IA2_STATE_EDITABLE ROLE_SYSTEM_TABLE name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_CELL name='' IA2_STATE_EDITABLE ROLE_SYSTEM_ROW name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name='Always expose editable tables as tables' IA2_STATE_EDITABLE ROLE_SYSTEM_CELL name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_COLUMN name='' UNAVAILABLE IA2_STATE_EDITABLE ROLE_SYSTEM_TEXT name='Always expose editable tables as tables' IA2_STATE_EDITABLE
IA2_ROLE_SECTION name='' UNAVAILABLE IA2_STATE_EDITABLE ROLE_SYSTEM_COLUMN name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_LIST name='' IA2_STATE_EDITABLE IA2_ROLE_SECTION name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_LISTITEM name='' IA2_STATE_EDITABLE ROLE_SYSTEM_LIST name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name='1' READONLY ROLE_SYSTEM_LISTITEM name='' IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name='Editable list item' IA2_STATE_EDITABLE ROLE_SYSTEM_TEXT name='1' READONLY
ROLE_SYSTEM_TEXT name='Editable list item' IA2_STATE_EDITABLE
IA2_ROLE_PARAGRAPH name='' FOCUSABLE IA2_STATE_EDITABLE IA2_ROLE_PARAGRAPH name='' FOCUSABLE IA2_STATE_EDITABLE
ROLE_SYSTEM_TEXT name='Keep the role, just change the state' IA2_STATE_EDITABLE ROLE_SYSTEM_TEXT name='Keep the role, just change the state' IA2_STATE_EDITABLE
<!--
@MAC-DENY:subrole*
-->
<html> <html>
<body> <body>
<div tabindex=0>Focusable div</div> <div tabindex=0>Focusable div</div>
......
<!-- <!--
@MAC-ALLOW:roleDescription='footer' @MAC-ALLOW:roleDescription='footer'
@MAC-ALLOW:subrole*
--> -->
<html> <html>
<body> <body>
......
#<skip -- not interesting on mac> AXWebArea title='' value=''
AXGroup title='' value=''
AXButton title='Submit' value=''
<!-- <!--
@MAC-DENY:subrole*
@WIN-ALLOW:value* @WIN-ALLOW:value*
@WIN-DENY:description* @WIN-DENY:description*
@WIN-DENY:name* @WIN-DENY:name*
......
#<skip -- not interesting on mac> AXWebArea title='' value=''
AXGroup title='' value=''
AXGroup title='' value=''
AXStaticText title='' value='Label'
<!--
@MAC-ALLOW:subrole*
-->
<html> <html>
<body> <body>
<ul> <ul>
......
#<skip -- not interesting on mac> AXWebArea title='' value=''
AXGroup title='' value=''
AXStaticText title='' value='Before'
AXGroup title='' value=''
AXStaticText title='' value='Paragraph'
AXGroup title='' value=''
AXStaticText title='' value='After'
AXWebArea subrole=(null) roleDescription='HTML content' title='' value='' AXWebArea roleDescription='HTML content' title='' value=''
AXSlider subrole=(null) roleDescription='stepper' title='' value='5' AXSlider roleDescription='stepper' title='' value='5'
AXWebArea subrole=(null) title='' value='' AXWebArea title='' value=''
AXButton subrole=(null) title='Regular button' value='' AXButton title='Regular button' value=''
AXButton subrole=(null) title='' value='' AXButton title='Toggle button' value=''
AXStaticText subrole=(null) title='' value='Toggle button'
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
ROLE_SYSTEM_PUSHBUTTON FOCUSABLE ROLE_SYSTEM_PUSHBUTTON FOCUSABLE
IA2_ROLE_TOGGLE_BUTTON FOCUSABLE IA2_ROLE_TOGGLE_BUTTON FOCUSABLE
ROLE_SYSTEM_TEXT READONLY
<!--
@MAC-ALLOW:subrole*
-->
<html> <html>
<body> <body>
<ul> <ul>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment