Commit 1e712e8b authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

All DumpAccessibilityTree tests expose the HTML element.

These were the final DumpAccessibilityTree tests
that needed to be migrated. They were previously
excluded because of an Android issue.

Move back the remaining tests to the correct place
in the file and get rid of the temporary subclass.

For context, this is an incremental step towards
eventually trying to include everything in the
accessibility tree, rather than having some
AXObjects that are "skipped".

Bug: 1063155
Change-Id: I6b9363f6cae4020a6263b9d9ada722834849ec94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2141219Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760149}
parent db92a470
...@@ -186,6 +186,18 @@ class DumpAccessibilityTreeTest : public DumpAccessibilityTestBase { ...@@ -186,6 +186,18 @@ class DumpAccessibilityTreeTest : public DumpAccessibilityTestBase {
RunTest(test_harness_file, "accessibility/test-harness"); RunTest(test_harness_file, "accessibility/test-harness");
} }
protected:
// Override from DumpAccessibilityTestBase.
void ChooseFeatures(std::vector<base::Feature>* enabled_features,
std::vector<base::Feature>* disabled_features) override {
// http://crbug.com/1063155 - temporary until this is enabled
// everywhere.
enabled_features->emplace_back(
features::kEnableAccessibilityExposeHTMLElement);
DumpAccessibilityTestBase::ChooseFeatures(enabled_features,
disabled_features);
}
}; };
void DumpAccessibilityTreeTest::AddDefaultFilters( void DumpAccessibilityTreeTest::AddDefaultFilters(
...@@ -225,61 +237,6 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -225,61 +237,6 @@ INSTANTIATE_TEST_SUITE_P(
AccessibilityTreeFormatter::GetTestPasses().size()), AccessibilityTreeFormatter::GetTestPasses().size()),
DumpAccessibilityTreeTestPassToString()); DumpAccessibilityTreeTestPassToString());
// http://crbug.com/1063155 - subclass of DumpAccessibilityTreeTest
// that enables exposing the HTML element. Temporary until this is enabled
// everywhere.
class DumpAccessibilityTreeTestWithHTMLElement
: public DumpAccessibilityTreeTest {
private:
void ChooseFeatures(std::vector<base::Feature>* enabled_features,
std::vector<base::Feature>* disabled_features) override {
enabled_features->emplace_back(
features::kEnableAccessibilityExposeHTMLElement);
DumpAccessibilityTreeTest::ChooseFeatures(enabled_features,
disabled_features);
}
};
INSTANTIATE_TEST_SUITE_P(
All,
DumpAccessibilityTreeTestWithHTMLElement,
::testing::Range(size_t{0},
AccessibilityTreeFormatter::GetTestPasses().size()),
DumpAccessibilityTreeTestPassToString());
// TODO(crbug.com/1063155): put these back in sorted order once they pass
// with the kEnableAccessibilityExposeHTMLElement flag.
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityAriaProgressbar) {
RunAriaTest(FILE_PATH_LITERAL("aria-progressbar.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityCanvas) {
RunHtmlTest(FILE_PATH_LITERAL("canvas.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityModalDialogClosed) {
RunHtmlTest(FILE_PATH_LITERAL("modal-dialog-closed.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityDialog) {
RunHtmlTest(FILE_PATH_LITERAL("dialog.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityListMarkers) {
RunHtmlTest(FILE_PATH_LITERAL("list-markers.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityUl) {
RunHtmlTest(FILE_PATH_LITERAL("ul.html"));
}
// TODO(crbug.com/1063155): in process of refactoring all tests to enable the
// kEnableAccessibilityExposeHTMLElement flag, without doing all at the
// same time.
#define DumpAccessibilityTreeTest DumpAccessibilityTreeTestWithHTMLElement
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityCSSColor) { IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityCSSColor) {
RunCSSTest(FILE_PATH_LITERAL("color.html")); RunCSSTest(FILE_PATH_LITERAL("color.html"));
} }
...@@ -980,6 +937,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityAriaPressed) { ...@@ -980,6 +937,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityAriaPressed) {
RunAriaTest(FILE_PATH_LITERAL("aria-pressed.html")); RunAriaTest(FILE_PATH_LITERAL("aria-pressed.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityAriaProgressbar) {
RunAriaTest(FILE_PATH_LITERAL("aria-progressbar.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityAriaRadio) { IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityAriaRadio) {
RunAriaTest(FILE_PATH_LITERAL("aria-radio.html")); RunAriaTest(FILE_PATH_LITERAL("aria-radio.html"));
} }
...@@ -1326,6 +1288,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityButtonNameCalc) { ...@@ -1326,6 +1288,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityButtonNameCalc) {
RunHtmlTest(FILE_PATH_LITERAL("button-name-calc.html")); RunHtmlTest(FILE_PATH_LITERAL("button-name-calc.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityCanvas) {
RunHtmlTest(FILE_PATH_LITERAL("canvas.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityCanvasFallback) { IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityCanvasFallback) {
RunHtmlTest(FILE_PATH_LITERAL("canvas-fallback.html")); RunHtmlTest(FILE_PATH_LITERAL("canvas-fallback.html"));
} }
...@@ -1376,6 +1342,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityDfn) { ...@@ -1376,6 +1342,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityDfn) {
RunHtmlTest(FILE_PATH_LITERAL("dfn.html")); RunHtmlTest(FILE_PATH_LITERAL("dfn.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityDialog) {
RunHtmlTest(FILE_PATH_LITERAL("dialog.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityDisabled) { IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityDisabled) {
RunHtmlTest(FILE_PATH_LITERAL("disabled.html")); RunHtmlTest(FILE_PATH_LITERAL("disabled.html"));
} }
...@@ -1553,13 +1523,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, ...@@ -1553,13 +1523,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
RunAriaTest(FILE_PATH_LITERAL("hidden-labelled-by.html")); RunAriaTest(FILE_PATH_LITERAL("hidden-labelled-by.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTestWithHTMLElement, IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityHR) {
AccessibilityHR) {
RunHtmlTest(FILE_PATH_LITERAL("hr.html")); RunHtmlTest(FILE_PATH_LITERAL("hr.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTestWithHTMLElement, IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityHTML) {
AccessibilityHTML) {
RunHtmlTest(FILE_PATH_LITERAL("html.html")); RunHtmlTest(FILE_PATH_LITERAL("html.html"));
} }
...@@ -1950,6 +1918,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, ...@@ -1950,6 +1918,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
RunHtmlTest(FILE_PATH_LITERAL("list-marker-styles.html")); RunHtmlTest(FILE_PATH_LITERAL("list-marker-styles.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityListMarkers) {
RunHtmlTest(FILE_PATH_LITERAL("list-markers.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityLongText) { IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityLongText) {
RunHtmlTest(FILE_PATH_LITERAL("long-text.html")); RunHtmlTest(FILE_PATH_LITERAL("long-text.html"));
} }
...@@ -1979,6 +1951,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityMeter) { ...@@ -1979,6 +1951,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityMeter) {
RunHtmlTest(FILE_PATH_LITERAL("meter.html")); RunHtmlTest(FILE_PATH_LITERAL("meter.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityModalDialogClosed) {
RunHtmlTest(FILE_PATH_LITERAL("modal-dialog-closed.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityModalDialogOpened) { AccessibilityModalDialogOpened) {
RunHtmlTest(FILE_PATH_LITERAL("modal-dialog-opened.html")); RunHtmlTest(FILE_PATH_LITERAL("modal-dialog-opened.html"));
...@@ -2274,6 +2251,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityTruncateLabel) { ...@@ -2274,6 +2251,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityTruncateLabel) {
RunHtmlTest(FILE_PATH_LITERAL("truncate-label.html")); RunHtmlTest(FILE_PATH_LITERAL("truncate-label.html"));
} }
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityUl) {
RunHtmlTest(FILE_PATH_LITERAL("ul.html"));
}
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityVar) { IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityVar) {
RunHtmlTest(FILE_PATH_LITERAL("var.html")); RunHtmlTest(FILE_PATH_LITERAL("var.html"));
} }
......
rootWebArea rootWebArea
++genericContainer ignored ++genericContainer ignored
++++progressIndicator valueForRange=3.00 minValueForRange=1.00 maxValueForRange=37.00 ++++genericContainer ignored
++++progressIndicator value='three' valueForRange=3.00 minValueForRange=1.00 maxValueForRange=96.00 ++++++progressIndicator valueForRange=3.00 minValueForRange=1.00 maxValueForRange=37.00
++++progressIndicator minValueForRange=0.00 maxValueForRange=10.00 ++++++progressIndicator value='three' valueForRange=3.00 minValueForRange=1.00 maxValueForRange=96.00
++++++progressIndicator minValueForRange=0.00 maxValueForRange=10.00
rootWebArea rootWebArea
++genericContainer ++genericContainer ignored
++++canvas ++++genericContainer
++++++staticText name='Static fallback' ++++++canvas
++++canvas ++++++++staticText name='Static fallback'
++++++link name='Interactive fallback' ++++++canvas
++++++++staticText name='Interactive fallback' ++++++++link name='Interactive fallback'
++++++++++staticText name='Interactive fallback'
rootWebArea rootWebArea
++genericContainer ignored ++genericContainer ignored
++++dialog ++++genericContainer ignored
++++++staticText name='Text in dialog' ++++++dialog
++++++++inlineTextBox name='Text in dialog' ++++++++staticText name='Text in dialog'
++++++++++inlineTextBox name='Text in dialog'
rootWebArea rootWebArea
++genericContainer ignored ++genericContainer ignored
++++list ++++genericContainer ignored
++++++listItem ++++++list
++++++++listMarker name='• ' ++++++++listItem
++++++++++staticText name='• ' ++++++++++listMarker name='• '
++++++++++++inlineTextBox name='• ' ++++++++++++staticText name='• '
++++++++staticText name='First item properly groups itself despite ' ++++++++++++++inlineTextBox name='• '
++++++++++inlineTextBox name='First item properly groups itself despite ' ++++++++++staticText name='First item properly groups itself despite '
++++++++staticText name='bolded' ++++++++++++inlineTextBox name='First item properly groups itself despite '
++++++++++inlineTextBox name='bolded' ++++++++++staticText name='bolded'
++++++++staticText name=' text.' ++++++++++++inlineTextBox name='bolded'
++++++++++inlineTextBox name=' text.' ++++++++++staticText name=' text.'
++++++listItem ++++++++++++inlineTextBox name=' text.'
++++++++listMarker name='• ' ++++++++listItem
++++++++++staticText name='• ' ++++++++++listMarker name='• '
++++++++++++inlineTextBox name='• ' ++++++++++++staticText name='• '
++++++++staticText name='This should also be ' ++++++++++++++inlineTextBox name='• '
++++++++++inlineTextBox name='This should also be ' ++++++++++staticText name='This should also be '
++++++++staticText name='seen' ++++++++++++inlineTextBox name='This should also be '
++++++++++inlineTextBox name='seen' ++++++++++staticText name='seen'
++++++++staticText name=' as a group.' ++++++++++++inlineTextBox name='seen'
++++++++++inlineTextBox name=' as a group.' ++++++++++staticText name=' as a group.'
++++++listItem ++++++++++++inlineTextBox name=' as a group.'
++++++++listMarker name='• ' ++++++++listItem
++++++++++staticText name='• ' ++++++++++listMarker name='• '
++++++++++++inlineTextBox name='• ' ++++++++++++staticText name='• '
++++++++staticText name='Some ' ++++++++++++++inlineTextBox name='• '
++++++++++inlineTextBox name='Some ' ++++++++++staticText name='Some '
++++++++staticText name='more' ++++++++++++inlineTextBox name='Some '
++++++++++inlineTextBox name='more' ++++++++++staticText name='more'
++++++++staticText name=' text.' ++++++++++++inlineTextBox name='more'
++++++++++inlineTextBox name=' text.' ++++++++++staticText name=' text.'
++++++++++++inlineTextBox name=' text.'
rootWebArea rootWebArea
++genericContainer ignored ++genericContainer ignored
++++staticText name='Test that elements respawn in the accessibility tree after a modal dialog closes.' ++++genericContainer ignored
++++++inlineTextBox name='Test that elements respawn in the accessibility tree after a modal dialog closes.' ++++++staticText name='Test that elements respawn in the accessibility tree after a modal dialog closes.'
++++section ++++++++inlineTextBox name='Test that elements respawn in the accessibility tree after a modal dialog closes.'
++++++popUpButton collapsed value='This should be in the tree.' haspopup=menu ++++++section
++++++++menuListPopup invisible ++++++++popUpButton collapsed value='This should be in the tree.' haspopup=menu
++++++++++menuListOption name='This should be in the tree.' selected=true ++++++++++menuListPopup invisible
++++colorWell value='#000000' ++++++++++++menuListOption name='This should be in the tree.' selected=true
++++++colorWell value='#000000'
rootWebArea rootWebArea
++genericContainer ignored ++genericContainer ignored
++++list ++++genericContainer ignored
++++++listItem hierarchicalLevel=1 ++++++list
++++++++listMarker name='• ' ++++++++listItem hierarchicalLevel=1
++++++++++staticText name='• ' ++++++++++listMarker name='• '
++++++++++++inlineTextBox name='• ' ++++++++++++staticText name='• '
++++++++staticText name='Item 1' ++++++++++++++inlineTextBox name='• '
++++++++++inlineTextBox name='Item 1' ++++++++++staticText name='Item 1'
++++++listItem hierarchicalLevel=1 ++++++++++++inlineTextBox name='Item 1'
++++++++listMarker name='• ' ++++++++listItem hierarchicalLevel=1
++++++++++staticText name='• ' ++++++++++listMarker name='• '
++++++++++++inlineTextBox name='• ' ++++++++++++staticText name='• '
++++++++staticText name='Item 2' ++++++++++++++inlineTextBox name='• '
++++++++++inlineTextBox name='Item 2' ++++++++++staticText name='Item 2'
++++++listItem hierarchicalLevel=1 ++++++++++++inlineTextBox name='Item 2'
++++++++listMarker name='• ' ++++++++listItem hierarchicalLevel=1
++++++++++staticText name='• ' ++++++++++listMarker name='• '
++++++++++++inlineTextBox name='• ' ++++++++++++staticText name='• '
++++++++staticText name='Item 3' ++++++++++++++inlineTextBox name='• '
++++++++++inlineTextBox name='Item 3' ++++++++++staticText name='Item 3'
++++++++++++inlineTextBox name='Item 3'
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