Title: [229344] trunk
Revision
229344
Author
n_w...@apple.com
Date
2018-03-06 14:49:27 -0800 (Tue, 06 Mar 2018)

Log Message

AX: Flaky test after r229310
https://bugs.webkit.org/show_bug.cgi?id=183376
<rdar://problem/38188685>

Reviewed by Chris Fleizach.

Source/WebCore:

The test that forces the context menu to show sometimes locks up
the test runner. Also, we missed a case where calling AXShowMenu
action on a combobox is not dispatching the accessibility event.

Using the combobox example to test the event dispatching in order to
avoid the test hang.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):

LayoutTests:

* accessibility/mac/AOM-events-all-expected.txt:
* accessibility/mac/AOM-events-all.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (229343 => 229344)


--- trunk/LayoutTests/ChangeLog	2018-03-06 22:49:21 UTC (rev 229343)
+++ trunk/LayoutTests/ChangeLog	2018-03-06 22:49:27 UTC (rev 229344)
@@ -1,3 +1,14 @@
+2018-03-06  Nan Wang  <n_w...@apple.com>
+
+        AX: Flaky test after r229310
+        https://bugs.webkit.org/show_bug.cgi?id=183376
+        <rdar://problem/38188685>
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/mac/AOM-events-all-expected.txt:
+        * accessibility/mac/AOM-events-all.html:
+
 2018-03-06  Chris Dumez  <cdu...@apple.com>
 
         fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates

Modified: trunk/LayoutTests/accessibility/mac/AOM-events-all-expected.txt (229343 => 229344)


--- trunk/LayoutTests/accessibility/mac/AOM-events-all-expected.txt	2018-03-06 22:49:21 UTC (rev 229343)
+++ trunk/LayoutTests/accessibility/mac/AOM-events-all-expected.txt	2018-03-06 22:49:27 UTC (rev 229344)
@@ -1,4 +1,6 @@
-  button  
+  button
+option 1
+
 This tests all accessibility events.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Modified: trunk/LayoutTests/accessibility/mac/AOM-events-all.html (229343 => 229344)


--- trunk/LayoutTests/accessibility/mac/AOM-events-all.html	2018-03-06 22:49:21 UTC (rev 229343)
+++ trunk/LayoutTests/accessibility/mac/AOM-events-all.html	2018-03-06 22:49:27 UTC (rev 229344)
@@ -8,6 +8,11 @@
 <input type="text" id="input">
 <button id="button">button</button>
 
+<div id="combo" tabindex=0 role="combobox" aria-expanded="false" aria-label="Test">
+<div role="listbox">
+<div role="option">option 1</div>
+</div></div>
+
 <select id="group" multiple="multiple">
     <option id="option">Option 1</option>
     <option>Option 2</option>
@@ -73,8 +78,8 @@
 
         function testShowContextMenu() {
             debug("\nTest accessiblecontextmenu");
-            node = document.getElementById("button");
-            axNode = accessibilityController.accessibleElementById("button");
+            node = document.getElementById("combo");
+            axNode = accessibilityController.accessibleElementById("combo");
 
             node._onaccessiblecontextmenu_ = function() {
                 debug("received accessiblecontextmenu event");

Modified: trunk/Source/WebCore/ChangeLog (229343 => 229344)


--- trunk/Source/WebCore/ChangeLog	2018-03-06 22:49:21 UTC (rev 229343)
+++ trunk/Source/WebCore/ChangeLog	2018-03-06 22:49:27 UTC (rev 229344)
@@ -1,3 +1,22 @@
+2018-03-06  Nan Wang  <n_w...@apple.com>
+
+        AX: Flaky test after r229310
+        https://bugs.webkit.org/show_bug.cgi?id=183376
+        <rdar://problem/38188685>
+
+        Reviewed by Chris Fleizach.
+
+        The test that forces the context menu to show sometimes locks up 
+        the test runner. Also, we missed a case where calling AXShowMenu
+        action on a combobox is not dispatching the accessibility event.
+
+        Using the combobox example to test the event dispatching in order to
+        avoid the test hang.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
+        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
+
 2018-03-06  Chris Dumez  <cdu...@apple.com>
 
         fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (229343 => 229344)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2018-03-06 22:49:21 UTC (rev 229343)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2018-03-06 22:49:27 UTC (rev 229344)
@@ -3521,6 +3521,9 @@
 
 - (void)accessibilityPerformShowMenuAction
 {
+    if (m_object && m_object->dispatchAccessibilityEventWithType(AccessibilityEventType::ContextMenu))
+        return;
+    
     if (m_object->roleValue() == AccessibilityRole::ComboBox)
         m_object->setIsExpanded(true);
     else {
@@ -3539,9 +3542,6 @@
     if (!page)
         return;
     
-    if (m_object->dispatchAccessibilityEventWithType(AccessibilityEventType::ContextMenu))
-        return;
-    
     IntRect rect = snappedIntRect(m_object->elementRect());
     FrameView* frameView = m_object->documentFrameView();
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to