Changeset 248189 in webkit


Ignore:
Timestamp:
Aug 2, 2019 4:20:31 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[ Mac ] Layout Test accessibility/mac/press-not-work-for-disabled-menu-list.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196505
<rdar://problem/49532620>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-08-02
Reviewed by Chris Fleizach.

Re-wrote test in a timing independent way. This should fix the intermittent failures.

  • accessibility/mac/press-not-work-for-disabled-menu-list.html:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r248175 r248189  
     12019-08-02  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        [ Mac ] Layout Test accessibility/mac/press-not-work-for-disabled-menu-list.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=196505
     5        <rdar://problem/49532620>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        Re-wrote test in a timing independent way. This should fix the intermittent failures.
     10        * accessibility/mac/press-not-work-for-disabled-menu-list.html:
     11
    1122019-08-02  Yury Semikhatsky  <yurys@chromium.org>
    213
  • trunk/LayoutTests/accessibility/mac/press-not-work-for-disabled-menu-list.html

    r241190 r248189  
    4343
    4444    // We don't test for enabled controls because opening menu lists waits on the UI process to display the menu.
    45     var numOfTests = 3, notificationCount = 0;
     45    var testCount = 3, testIndex = 0;
    4646    var lists = [null, null, null];
    47     if (window.accessibilityController) {
    48         jsTestIsAsync = true;
    49         pressNext(0);
    50     }
    5147
    52     function pressNext(testId) {
    53         if (testId > numOfTests)
     48    function testNextList() {
     49        if (testIndex >= testCount) {
     50            finishJSTest();
    5451            return;
    55         var menulist = accessibilityController.accessibleElementById("test" + testId);
     52        }
     53
     54        var menulist = accessibilityController.accessibleElementById("test" + testIndex);
    5655        menulist.addNotificationListener(pressListener);
    5756        menulist.press();
    58         lists[testId] = menulist;
    59         window.setTimeout(function() {
    60             pressNext(testId + 1);
    61         }, 0);
     57        lists[testIndex] = menulist;
    6258    }
    6359
    6460    function pressListener(notification) {
    65         if (notification == "AXPressDidFail" || notification == "AXPressDidSucceed")
    66             notificationCount++;
     61        lists[testIndex].removeNotificationListener(pressListener);
    6762
    6863        debug("Got notification: " + notification);
    69         lists[notificationCount-1].removeNotificationListener(pressListener);
    70         if (notificationCount == numOfTests) {
    71             finishJSTest();
    72         }
     64
     65        testIndex++;
     66        testNextList();
     67    }
     68
     69    if (window.accessibilityController) {
     70        jsTestIsAsync = true;
     71        testNextList();
    7372    }
    7473</script>
Note: See TracChangeset for help on using the changeset viewer.