Changeset 229344 in webkit


Ignore:
Timestamp:
Mar 6, 2018 2:49:27 PM (6 years ago)
Author:
n_wang@apple.com
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:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r229341 r229344  
     12018-03-06  Nan Wang  <n_wang@apple.com>
     2
     3        AX: Flaky test after r229310
     4        https://bugs.webkit.org/show_bug.cgi?id=183376
     5        <rdar://problem/38188685>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        * accessibility/mac/AOM-events-all-expected.txt:
     10        * accessibility/mac/AOM-events-all.html:
     11
    1122018-03-06  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/accessibility/mac/AOM-events-all-expected.txt

    r229310 r229344  
    1   button 
     1  button
     2option 1
     3
    24This tests all accessibility events.
    35
  • trunk/LayoutTests/accessibility/mac/AOM-events-all.html

    r229310 r229344  
    88<input type="text" id="input">
    99<button id="button">button</button>
     10
     11<div id="combo" tabindex=0 role="combobox" aria-expanded="false" aria-label="Test">
     12<div role="listbox">
     13<div role="option">option 1</div>
     14</div></div>
    1015
    1116<select id="group" multiple="multiple">
     
    7479        function testShowContextMenu() {
    7580            debug("\nTest accessiblecontextmenu");
    76             node = document.getElementById("button");
    77             axNode = accessibilityController.accessibleElementById("button");
     81            node = document.getElementById("combo");
     82            axNode = accessibilityController.accessibleElementById("combo");
    7883
    7984            node.onaccessiblecontextmenu = function() {
  • trunk/Source/WebCore/ChangeLog

    r229341 r229344  
     12018-03-06  Nan Wang  <n_wang@apple.com>
     2
     3        AX: Flaky test after r229310
     4        https://bugs.webkit.org/show_bug.cgi?id=183376
     5        <rdar://problem/38188685>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        The test that forces the context menu to show sometimes locks up
     10        the test runner. Also, we missed a case where calling AXShowMenu
     11        action on a combobox is not dispatching the accessibility event.
     12
     13        Using the combobox example to test the event dispatching in order to
     14        avoid the test hang.
     15
     16        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     17        (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
     18        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
     19
    1202018-03-06  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r229310 r229344  
    35223522- (void)accessibilityPerformShowMenuAction
    35233523{
     3524    if (m_object && m_object->dispatchAccessibilityEventWithType(AccessibilityEventType::ContextMenu))
     3525        return;
     3526   
    35243527    if (m_object->roleValue() == AccessibilityRole::ComboBox)
    35253528        m_object->setIsExpanded(true);
     
    35383541    Page* page = m_object->page();
    35393542    if (!page)
    3540         return;
    3541    
    3542     if (m_object->dispatchAccessibilityEventWithType(AccessibilityEventType::ContextMenu))
    35433543        return;
    35443544   
Note: See TracChangeset for help on using the changeset viewer.