- Revision
- 292520
- Author
- [email protected]
- Date
- 2022-04-06 18:21:13 -0700 (Wed, 06 Apr 2022)
Log Message
[ Mac ] accessibility/mac/expanded-notification.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=238830
rdar://91313419
Reviewed by Chris Fleizach.
Source/WebCore:
Test: accessibility/mac/expanded-notification.html
This patch fixes the flackiness of this test and also fixes this test
in isolated tree mode that was timing out.
Instead of AXIsolatedTree::updateChildren on the AXExpandedChanged
notification, we now update the ISExpanded property in the target object.
If new children are added or removed from the tree as the result of an
element's expanded state change, those tree mutations should generate
separate AXChildrenChanged notifications.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::updateIsolatedTree):
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):
LayoutTests:
Fixes the flakiness by checking the number of notifications received in
the same async block where the changes are occuring. This now passes
with no flakiness in both isolated tree mode on and off.
* accessibility/mac/expanded-notification-expected.txt:
* accessibility/mac/expanded-notification.html:
* platform/mac/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (292519 => 292520)
--- trunk/LayoutTests/ChangeLog 2022-04-07 01:08:53 UTC (rev 292519)
+++ trunk/LayoutTests/ChangeLog 2022-04-07 01:21:13 UTC (rev 292520)
@@ -1,3 +1,19 @@
+2022-04-06 Andres Gonzalez <[email protected]>
+
+ [ Mac ] accessibility/mac/expanded-notification.html is a flaky text failure
+ https://bugs.webkit.org/show_bug.cgi?id=238830
+ rdar://91313419
+
+ Reviewed by Chris Fleizach.
+
+ Fixes the flakiness by checking the number of notifications received in
+ the same async block where the changes are occuring. This now passes
+ with no flakiness in both isolated tree mode on and off.
+
+ * accessibility/mac/expanded-notification-expected.txt:
+ * accessibility/mac/expanded-notification.html:
+ * platform/mac/TestExpectations:
+
2022-04-06 J Pascoe <[email protected]>
Fix expected, actual links for variant-based imported wpt tests
Modified: trunk/LayoutTests/accessibility/mac/expanded-notification-expected.txt (292519 => 292520)
--- trunk/LayoutTests/accessibility/mac/expanded-notification-expected.txt 2022-04-07 01:08:53 UTC (rev 292519)
+++ trunk/LayoutTests/accessibility/mac/expanded-notification-expected.txt 2022-04-07 01:21:13 UTC (rev 292520)
@@ -1,14 +1,10 @@
-
This tests that aria-expanded changes will send notifications.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
Initial expanded status: false
Received notification: AXExpandedChanged
Expanded status: true
Received notification: AXExpandedChanged
Expanded status: false
+
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/accessibility/mac/expanded-notification.html (292519 => 292520)
--- trunk/LayoutTests/accessibility/mac/expanded-notification.html 2022-04-07 01:08:53 UTC (rev 292519)
+++ trunk/LayoutTests/accessibility/mac/expanded-notification.html 2022-04-07 01:21:13 UTC (rev 292520)
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
-<script src=""
+<script src=""
<script src=""
</head>
<body>
@@ -8,23 +8,16 @@
<button id="button" aria-expanded="false">
-<p id="description"></p>
-<div id="console"></div>
-
<script>
- description("This tests that aria-expanded changes will send notifications.");
+ let output = "This tests that aria-expanded changes will send notifications.\n";
- var notificationCount = 0;
+ let notificationCount = 0;
function notificationCallback(element, notification) {
if (notification == "AXExpandedChanged") {
- notificationCount++;
+ notificationCount++;
- debug("Received notification: " + notification);
- debug("Expanded status: " + element.isExpanded);
- if (notificationCount == 2) {
- accessibilityController.removeNotificationListener();
- finishJSTest();
- }
+ output += `Received notification: ${notification}\n`;
+ output += `Expanded status: ${element.isExpanded}\n`;
}
}
@@ -32,8 +25,8 @@
window.jsTestIsAsync = true;
accessibilityController.addNotificationListener(notificationCallback);
- var button = accessibilityController.accessibleElementById("button");
- debug("Initial expanded status: " + button.isExpanded);
+ let button = accessibilityController.accessibleElementById("button");
+ output += `Initial expanded status: ${button.isExpanded}\n`;
document.getElementById("button").setAttribute("aria-expanded", "true");
setTimeout(async () => {
@@ -45,9 +38,16 @@
await waitFor(() => {
return !button.isExpanded;
});
+
+ await waitFor(() => {
+ return notificationCount == 2;
+ });
+
+ debug(output);
+ accessibilityController.removeNotificationListener();
+ finishJSTest();
}, 0);
}
</script>
-<script src=""
</body>
</html>
Modified: trunk/LayoutTests/platform/mac/TestExpectations (292519 => 292520)
--- trunk/LayoutTests/platform/mac/TestExpectations 2022-04-07 01:08:53 UTC (rev 292519)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2022-04-07 01:21:13 UTC (rev 292520)
@@ -2090,8 +2090,6 @@
webkit.org/b/238824 http/tests/workers/service/openwindow-from-notification-click.html [ Pass Failure ]
-webkit.org/b/238830 accessibility/mac/expanded-notification.html [ Pass Failure ]
-
webkit.org/b/215335 [ BigSur Release ] webanimations/css-transition-retargeting-during-ready-promise.html [ Pass Failure ]
webkit.org/b/223472 [ BigSur Release arm64 ] imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Pass Failure ]
Modified: trunk/Source/WebCore/ChangeLog (292519 => 292520)
--- trunk/Source/WebCore/ChangeLog 2022-04-07 01:08:53 UTC (rev 292519)
+++ trunk/Source/WebCore/ChangeLog 2022-04-07 01:21:13 UTC (rev 292520)
@@ -1,3 +1,26 @@
+2022-04-06 Andres Gonzalez <[email protected]>
+
+ [ Mac ] accessibility/mac/expanded-notification.html is a flaky text failure
+ https://bugs.webkit.org/show_bug.cgi?id=238830
+ rdar://91313419
+
+ Reviewed by Chris Fleizach.
+
+ Test: accessibility/mac/expanded-notification.html
+
+ This patch fixes the flackiness of this test and also fixes this test
+ in isolated tree mode that was timing out.
+ Instead of AXIsolatedTree::updateChildren on the AXExpandedChanged
+ notification, we now update the ISExpanded property in the target object.
+ If new children are added or removed from the tree as the result of an
+ element's expanded state change, those tree mutations should generate
+ separate AXChildrenChanged notifications.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::updateIsolatedTree):
+ * accessibility/isolatedtree/AXIsolatedTree.cpp:
+ (WebCore::AXIsolatedTree::updateNodeProperty):
+
2022-04-06 Said Abou-Hallawa <[email protected]>
[GPU Process] Make SVGFEImageElement::filterEffect() create an ImageBuffer compatible with the destination GraphicsContext
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (292519 => 292520)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2022-04-07 01:08:53 UTC (rev 292519)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2022-04-07 01:21:13 UTC (rev 292520)
@@ -3404,6 +3404,9 @@
tree->updateNodeProperty(*notification.first, AXPropertyName::CanSetFocusAttribute);
tree->updateNodeProperty(*notification.first, AXPropertyName::IsEnabled);
break;
+ case AXExpandedChanged:
+ tree->updateNodeProperty(*notification.first, AXPropertyName::IsExpanded);
+ break;
case AXSortDirectionChanged:
tree->updateNodeProperty(*notification.first, AXPropertyName::SortDirection);
break;
@@ -3427,8 +3430,7 @@
case AXLanguageChanged:
case AXRowCountChanged:
case AXRowCollapsed:
- case AXRowExpanded:
- case AXExpandedChanged: {
+ case AXRowExpanded: {
bool needsUpdate = appendIfNotContainsMatching(filteredNotifications, notification, [¬ification] (const std::pair<RefPtr<AXCoreObject>, AXNotification>& note) {
return note.second == notification.second && note.first.get() == notification.first.get();
});
Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (292519 => 292520)
--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp 2022-04-07 01:08:53 UTC (rev 292519)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp 2022-04-07 01:21:13 UTC (rev 292520)
@@ -332,6 +332,9 @@
case AXPropertyName::IsEnabled:
propertyMap.set(AXPropertyName::IsEnabled, axObject.isEnabled());
break;
+ case AXPropertyName::IsExpanded:
+ propertyMap.set(AXPropertyName::IsExpanded, axObject.isExpanded());
+ break;
case AXPropertyName::SortDirection:
propertyMap.set(AXPropertyName::SortDirection, static_cast<int>(axObject.sortDirection()));
break;