Title: [291272] releases/WebKitGTK/webkit-2.36
Revision
291272
Author
[email protected]
Date
2022-03-15 02:04:50 -0700 (Tue, 15 Mar 2022)

Log Message

Merge r290633 - [ATSPI] Remove layout tests checking children added/removed notifications
https://bugs.webkit.org/show_bug.cgi?id=237272

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Do not send children-changed notifications to WTR observers.

* accessibility/atspi/AccessibilityAtspi.cpp:
(WebCore::AccessibilityAtspi::childrenChanged):
(WebCore::AccessibilityAtspi::notifyChildrenChanged const): Deleted.
* accessibility/atspi/AccessibilityAtspi.h:

LayoutTests:

Children changed notifications are not expected by any other tests because other ports don't support them. We
already have unit tests to ensure they work as expected so we can just remove the layout tests and ensure we
don't emit those notifications either.

* accessibility/children-changed-sends-notification-expected.txt: Removed.
* accessibility/children-changed-sends-notification.html: Removed.
* accessibility/gtk/menu-list-unfocused-notifications-expected.txt:
* accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt: Removed.
* accessibility/gtk/no-notification-for-unrendered-iframe-children.html: Removed.
* platform/glib/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo-wk1/TestExpectations:

Modified Paths

Removed Paths

Diff

Modified: releases/WebKitGTK/webkit-2.36/LayoutTests/ChangeLog (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/ChangeLog	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/ChangeLog	2022-03-15 09:04:50 UTC (rev 291272)
@@ -1,3 +1,25 @@
+2022-03-01  Carlos Garcia Campos  <[email protected]>
+
+        [ATSPI] Remove layout tests checking children added/removed notifications
+        https://bugs.webkit.org/show_bug.cgi?id=237272
+
+        Reviewed by Adrian Perez de Castro.
+
+        Children changed notifications are not expected by any other tests because other ports don't support them. We
+        already have unit tests to ensure they work as expected so we can just remove the layout tests and ensure we
+        don't emit those notifications either.
+
+        * accessibility/children-changed-sends-notification-expected.txt: Removed.
+        * accessibility/children-changed-sends-notification.html: Removed.
+        * accessibility/gtk/menu-list-unfocused-notifications-expected.txt:
+        * accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt: Removed.
+        * accessibility/gtk/no-notification-for-unrendered-iframe-children.html: Removed.
+        * platform/glib/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/win/TestExpectations:
+        * platform/wincairo-wk1/TestExpectations:
+
 2022-02-25  Carlos Garcia Campos  <[email protected]>
 
         AX: List item marker not exposed when not a direct child of a list item

Deleted: releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/children-changed-sends-notification-expected.txt (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/children-changed-sends-notification-expected.txt	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/children-changed-sends-notification-expected.txt	2022-03-15 09:04:50 UTC (rev 291272)
@@ -1,17 +0,0 @@
-This test ensures that a notification is being emitted when children are added or removed for an accessibility object
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Plain text paragraph
-
-PARAGRAPH notification: AXChildrenAdded
-GLOBAL notification: AXChildrenAdded on element with role AXRole: AXParagraph
-PARAGRAPH notification: AXChildrenRemoved
-GLOBAL notification: AXChildrenRemoved on element with role AXRole: AXParagraph
-PASS paragraphNotificationCount is globalNotificationCount
-PASS globalNotificationCount is 2
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/children-changed-sends-notification.html (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/children-changed-sends-notification.html	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/children-changed-sends-notification.html	2022-03-15 09:04:50 UTC (rev 291272)
@@ -1,74 +0,0 @@
-<html>
-<head>
-<script src=""
-<script src=""
-</head>
-<body>
-
-<p id="description"></p>
-<p id="paragraph">Plain text paragraph <a id="testLink" href="" a link at the end</a></p>
-
-<div id="console"></div>
-
-<script>
-window.jsTestIsAsync = true;
-
-description("This test ensures that a notification is being emitted when children are added or removed for an accessibility object");
-
-function runTest() {
-    window.paragraphNotificationCount = 0;
-    window.globalNotificationCount = 0;
-
-    if (window.accessibilityController) {
-        var axWebArea = accessibilityController.rootElement.childAtIndex(0);
-
-        // Ensure the accessibility hierarchy is generated.
-        touchAccessibilityTree(axWebArea);
-
-        window.paragraph = axWebArea.childAtIndex(1);
-        paragraph.addNotificationListener(function(notification) {
-            paragraphNotificationCount++;
-            debug("PARAGRAPH notification: " + notification);
-        });
-
-        accessibilityController.addNotificationListener(function(element, notification) {
-            if (!element.isEqual(paragraph))
-                return;
-
-            globalNotificationCount++;
-            debug("GLOBAL notification: " + notification + " on element with role " + element.role);
-        });
-    }
-
-    var par = document.getElementById('paragraph');
-    window.newChild = document.createElement('button');
-    par.appendChild(newChild);
-
-    // Ensure the new child is added.
-    touchAccessibilityTree(axWebArea);
-
-    window.setTimeout(function() {
-        var link = document.getElementById('testLink');
-        link.style.display = 'none';
-
-        // Ensure the accessibility hierarchy is regenerated.
-        touchAccessibilityTree(axWebArea);
-
-        shouldBe("paragraphNotificationCount", "globalNotificationCount");
-        shouldBe("globalNotificationCount", "2");
-
-        if (window.accessibilityController) {
-            paragraph.removeNotificationListener();
-            accessibilityController.removeNotificationListener();
-        }
-
-        finishJSTest();
-    }, 0);
-}
-
-runTest();
-</script>
-
-<script src=""
-</body>
-</html>

Modified: releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/menu-list-unfocused-notifications-expected.txt (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/menu-list-unfocused-notifications-expected.txt	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/menu-list-unfocused-notifications-expected.txt	2022-03-15 09:04:50 UTC (rev 291272)
@@ -16,7 +16,6 @@
 AXSelectedChildrenChanged: AXRole: AXComboBox
 Focused element is: AXRole: AXButton
 
-AXChildrenAdded: AXRole: AXWebArea
 AXLoadComplete: AXRole: AXWebArea
 AXElementBusyChanged: AXRole: AXWebArea
 PASS successfullyParsed is true

Deleted: releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt	2022-03-15 09:04:50 UTC (rev 291272)
@@ -1,11 +0,0 @@
-This test ensures that a children-changed notification is not emitted for children of not-yet-rendered nested iframes.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-AXChildrenAdded on AXTitle: inner body (AXTitle: inner iframe)
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children.html (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children.html	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children.html	2022-03-15 09:04:50 UTC (rev 291272)
@@ -1,50 +0,0 @@
-<html>
-<head>
-<script src=""
-<script src=""
-</head>
-<body aria-label="outer body">
-<p id="description"></p>
-<iframe aria-label="outer iframe" id="iframe"></iframe>
-<div id="console"></div>
-<script>
-window.jsTestIsAsync = true;
-
-description("This test ensures that a children-changed notification is not emitted for children of not-yet-rendered nested iframes.");
-function runTest() {
-
-    if (window.accessibilityController) {
-        var axWebArea = accessibilityController.rootElement.childAtIndex(0);
-
-        // Generate the hierarchy before registering a listener so that we only see new notifications.
-        touchAccessibilityTree(axWebArea);
-
-        accessibilityController.addNotificationListener(function(element, notification, child) {
-            if (notification == "AXChildrenAdded" && element.role == "AXRole: AXGroup")
-                debug(notification + " on " + element.title + " (" + (child ? child.title : "null") + ")");
-        });
-    }
-
-    // Write content in the outer iframe, including an inner iframe. The latter should not emit a notification.
-    var iframe = document.getElementById("iframe");
-    var doc = iframe.contentWindow.document;
-    doc.open();
-    doc.write("<html><body aria-label='inner body'><iframe aria-label='inner iframe' src=''></body></html>");
-    doc.close();
-
-    // Re-generate the hierarchy to trigger the notifications.
-    touchAccessibilityTree(axWebArea);
-
-    window.setTimeout(function() {
-        if (window.accessibilityController) {
-            accessibilityController.removeNotificationListener();
-        }
-
-        finishJSTest();
-    }, 0);
-}
-runTest();
-</script>
-<script src=""
-</body>
-</html>

Modified: releases/WebKitGTK/webkit-2.36/LayoutTests/platform/glib/TestExpectations (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/platform/glib/TestExpectations	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/platform/glib/TestExpectations	2022-03-15 09:04:50 UTC (rev 291272)
@@ -414,7 +414,6 @@
 webkit.org/b/232256 accessibility/auto-fill-crash.html [ Timeout ]
 
 # Tests failing with ATSPI implementation.
-webkit.org/b/235941 accessibility/children-changed-sends-notification.html [ Failure ]
 webkit.org/b/235941 accessibility/select-element-at-index.html [ Failure ]
 
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: releases/WebKitGTK/webkit-2.36/LayoutTests/platform/gtk/TestExpectations (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/platform/gtk/TestExpectations	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/platform/gtk/TestExpectations	2022-03-15 09:04:50 UTC (rev 291272)
@@ -135,7 +135,6 @@
 accessibility/model-element-attributes.html [ Skip ]
 
 # Tests failing with ATSPI implementation.
-webkit.org/b/235941 accessibility/gtk/no-notification-for-unrendered-iframe-children.html [ Failure ]
 webkit.org/b/235941 accessibility/gtk/text-at-offset-embedded-objects.html [ Failure ]
 webkit.org/b/235941 accessibility/gtk/text-at-offset-special-chars.html [ Failure ]
 webkit.org/b/235941 accessibility/gtk/caret-offsets.html [ Timeout ]

Modified: releases/WebKitGTK/webkit-2.36/LayoutTests/platform/mac/TestExpectations (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/platform/mac/TestExpectations	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/platform/mac/TestExpectations	2022-03-15 09:04:50 UTC (rev 291272)
@@ -115,7 +115,6 @@
 accessibility/aria-checkbox-sends-notification.html
 accessibility/aria-switch-sends-notification.html
 accessibility/combo-box-collapsed-selection-changed.html
-accessibility/children-changed-sends-notification.html
 accessibility/multiselect-list-reports-active-option.html
 
 # Need to implement AccessibilityUIElement::clearSelectedChildren()

Modified: releases/WebKitGTK/webkit-2.36/LayoutTests/platform/win/TestExpectations (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/platform/win/TestExpectations	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/platform/win/TestExpectations	2022-03-15 09:04:50 UTC (rev 291272)
@@ -1547,7 +1547,6 @@
 # Accessibility tests for notifications that don't exist or aren't needed on Mac OS X (or Windows)
 accessibility/aria-checkbox-sends-notification.html [ Skip ]
 accessibility/combo-box-collapsed-selection-changed.html [ Skip ]
-accessibility/children-changed-sends-notification.html [ Skip ]
 accessibility/menu-list-sends-change-notification.html [ Skip ]
 accessibility/multiselect-list-reports-active-option.html [ Skip ]
 

Modified: releases/WebKitGTK/webkit-2.36/LayoutTests/platform/wincairo-wk1/TestExpectations (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/LayoutTests/platform/wincairo-wk1/TestExpectations	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/LayoutTests/platform/wincairo-wk1/TestExpectations	2022-03-15 09:04:50 UTC (rev 291272)
@@ -53,7 +53,6 @@
 # Accessibility tests for notifications that don't exist or aren't needed on Mac OS X (or Windows)
 accessibility/aria-checkbox-sends-notification.html [ Skip ]
 accessibility/combo-box-collapsed-selection-changed.html [ Skip ]
-accessibility/children-changed-sends-notification.html [ Skip ]
 accessibility/menu-list-sends-change-notification.html [ Skip ]
 accessibility/multiselect-list-reports-active-option.html [ Skip ]
 

Modified: releases/WebKitGTK/webkit-2.36/Source/WebCore/ChangeLog (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/Source/WebCore/ChangeLog	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/Source/WebCore/ChangeLog	2022-03-15 09:04:50 UTC (rev 291272)
@@ -1,3 +1,17 @@
+2022-03-01  Carlos Garcia Campos  <[email protected]>
+
+        [ATSPI] Remove layout tests checking children added/removed notifications
+        https://bugs.webkit.org/show_bug.cgi?id=237272
+
+        Reviewed by Adrian Perez de Castro.
+
+        Do not send children-changed notifications to WTR observers.
+
+        * accessibility/atspi/AccessibilityAtspi.cpp:
+        (WebCore::AccessibilityAtspi::childrenChanged):
+        (WebCore::AccessibilityAtspi::notifyChildrenChanged const): Deleted.
+        * accessibility/atspi/AccessibilityAtspi.h:
+
 2022-02-25  Carlos Garcia Campos  <[email protected]>
 
         AX: List item marker not exposed when not a direct child of a list item

Modified: releases/WebKitGTK/webkit-2.36/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp	2022-03-15 09:04:50 UTC (rev 291272)
@@ -426,10 +426,6 @@
 
 void AccessibilityAtspi::childrenChanged(AccessibilityObjectAtspi& atspiObject, AccessibilityObjectAtspi& child, ChildrenChanged change)
 {
-#if ENABLE(DEVELOPER_MODE)
-    notifyChildrenChanged(atspiObject, child, change);
-#endif
-
     if (!m_connection)
         return;
 
@@ -437,7 +433,6 @@
     if (m_clients.isEmpty())
         return;
 
-
     g_dbus_connection_emit_signal(m_connection.get(), nullptr, atspiObject.path().utf8().data(), "org.a11y.atspi.Event.Object", "ChildrenChanged",
         g_variant_new("(siiv(so))", change == ChildrenChanged::Added ? "add" : "remove", child.indexInParentForChildrenChanged(change),
         0, g_variant_new("(so)", uniqueName(), child.path().utf8().data()), uniqueName(), atspiObject.path().utf8().data()), nullptr);
@@ -452,7 +447,6 @@
     if (m_clients.isEmpty())
         return;
 
-
     g_dbus_connection_emit_signal(m_connection.get(), nullptr, rootObject.path().utf8().data(), "org.a11y.atspi.Event.Object", "ChildrenChanged",
         g_variant_new("(siiv(so))", change == ChildrenChanged::Added ? "add" : "remove", 0,
         0, g_variant_new("(so)", uniqueName(), child.path().utf8().data()), uniqueName(), rootObject.path().utf8().data()), nullptr);
@@ -904,13 +898,6 @@
         observer(atspiObject, "AXTextCaretMoved", caretOffset);
 }
 
-void AccessibilityAtspi::notifyChildrenChanged(AccessibilityObjectAtspi& atspiObject, AccessibilityObjectAtspi& child, ChildrenChanged change) const
-{
-    const char* notification = change == ChildrenChanged::Added ? "AXChildrenAdded" : "AXChildrenRemoved";
-    for (const auto& observer : m_notificationObservers.values())
-        observer(atspiObject, notification, child);
-}
-
 void AccessibilityAtspi::notifyValueChanged(AccessibilityObjectAtspi& atspiObject) const
 {
     for (const auto& observer : m_notificationObservers.values())

Modified: releases/WebKitGTK/webkit-2.36/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h (291271 => 291272)


--- releases/WebKitGTK/webkit-2.36/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h	2022-03-15 09:04:41 UTC (rev 291271)
+++ releases/WebKitGTK/webkit-2.36/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h	2022-03-15 09:04:50 UTC (rev 291272)
@@ -116,7 +116,6 @@
     void notifyMenuSelectionChanged(AccessibilityObjectAtspi&) const;
     void notifyTextChanged(AccessibilityObjectAtspi&) const;
     void notifyTextCaretMoved(AccessibilityObjectAtspi&, unsigned) const;
-    void notifyChildrenChanged(AccessibilityObjectAtspi&, AccessibilityObjectAtspi&, ChildrenChanged) const;
     void notifyValueChanged(AccessibilityObjectAtspi&) const;
     void notifyLoadEvent(AccessibilityObjectAtspi&, const CString&) const;
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to