⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 241307 in webkit


Ignore:
Timestamp:
Feb 12, 2019, 11:51:02 AM (8 years ago)
Author:
Chris Fleizach
Message:

AX: Fix flaky accessibility/loading-iframe-sends-notification.html
https://bugs.webkit.org/show_bug.cgi?id=194546

Reviewed by Zalan Bujtas.

This test was relying on timing between load events being sent and accessibility events being sent.
We don't need to do that, we can more directly test this interplay.

  • accessibility/loading-iframe-sends-notification-expected.txt:
  • accessibility/loading-iframe-sends-notification.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r241298 r241307  
     12019-02-12  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Fix flaky accessibility/loading-iframe-sends-notification.html
     4        https://bugs.webkit.org/show_bug.cgi?id=194546
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This test was relying on timing between load events being sent and accessibility events being sent.
     9        We don't need to do that, we can more directly test this interplay.
     10
     11        * accessibility/loading-iframe-sends-notification-expected.txt:
     12        * accessibility/loading-iframe-sends-notification.html:
     13
    1142019-02-12  Adrian Perez de Castro  <aperez@igalia.com>
    215
  • trunk/LayoutTests/accessibility/loading-iframe-sends-notification-expected.txt

    r102877 r241307  
    1414Got notification on iframe.
    1515PASS findByAccessibleTitleSubstring(root, 'InnerButton') != null is true
    16 PASS gotIframeNotification is true
    1716PASS successfullyParsed is true
    1817
  • trunk/LayoutTests/accessibility/loading-iframe-sends-notification.html

    r211573 r241307  
    4343    function runTest()
    4444    {
    45         window.gotIframeNotification = false;
    46 
    4745        if (window.accessibilityController) {
    4846            window.root = accessibilityController.rootElement;
     
    6058
    6159                debug("Got notification on iframe.");
    62                 gotIframeNotification = true;
    6360
    6461                // Check that the button within the iframe is now reachable from the root.
    6562                shouldBeTrue("findByAccessibleTitleSubstring(root, 'InnerButton') != null");
     63                accessibilityController.removeNotificationListener();
     64                finishJSTest();
    6665            });
    6766        }
    6867
    6968        window.iframeElement = document.getElementById("iframe");
    70         iframeElement.addEventListener("load", function() {
    71             window.setTimeout(function() {
    72                 shouldBeTrue("gotIframeNotification");
    73                 if (window.accessibilityController)
    74                     accessibilityController.removeNotificationListener();
    75 
    76                 finishJSTest();
    77             }, 10);
    78         }, false);
    7969
    8070        // Load content into the iframe. This will trigger the event
Note: See TracChangeset for help on using the changeset viewer.