Commit 419aea49 authored by Alison Maher's avatar Alison Maher Committed by Commit Bot

Fix flaky DumpAccessibilityTreeTest tests

This change fixes flaky test failures caused by the following CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1591484/22

Flaky behavior is fixed for the following tests:
-DumpAccessibilityTreeTest.AccessibilityIframePostEnable
-DumpAccessibilityTreeTest.AccessibilityIframe

DumpAccessibilityTreeTest.AccessibilityIframePostEnable is also
re-enabled as a revert to the following change:
https://chromium-review.googlesource.com/c/chromium/src/+/1638201

Bug: 969185
Change-Id: I1c961f215936a04ba54b5dd5ca6ba35205567648
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638925Reviewed-by: default avatarKurt Catti-Schmidt <kschmi@microsoft.com>
Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#665944}
parent d92e137c
...@@ -68,8 +68,7 @@ void BrowserAccessibility::Init(BrowserAccessibilityManager* manager, ...@@ -68,8 +68,7 @@ void BrowserAccessibility::Init(BrowserAccessibilityManager* manager,
} }
bool BrowserAccessibility::PlatformIsLeaf() const { bool BrowserAccessibility::PlatformIsLeaf() const {
if (!HasStringAttribute(ax::mojom::StringAttribute::kChildTreeId) && if (InternalChildCount() == 0)
InternalChildCount() == 0)
return true; return true;
// These types of objects may have children that we use as internal // These types of objects may have children that we use as internal
......
...@@ -1305,19 +1305,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityIframe) { ...@@ -1305,19 +1305,11 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityIframe) {
RunHtmlTest(FILE_PATH_LITERAL("iframe.html")); RunHtmlTest(FILE_PATH_LITERAL("iframe.html"));
} }
#if defined(OS_WIN)
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
DISABLED_AccessibilityIframePostEnable) {
enable_accessibility_after_navigating_ = true;
RunHtmlTest(FILE_PATH_LITERAL("iframe.html"));
}
#else
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityIframePostEnable) { AccessibilityIframePostEnable) {
enable_accessibility_after_navigating_ = true; enable_accessibility_after_navigating_ = true;
RunHtmlTest(FILE_PATH_LITERAL("iframe.html")); RunHtmlTest(FILE_PATH_LITERAL("iframe.html"));
} }
#endif
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityIframeCrossProcess) { AccessibilityIframeCrossProcess) {
......
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