Changeset 216150 in webkit


Ignore:
Timestamp:
May 3, 2017 3:30:38 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

LayoutTest http/tests/inspector/network/fetch-network-data.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=166038
<rdar://problem/29488489>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-05-03
Reviewed by Matt Baker.

  • platform/mac/TestExpectations:
  • http/tests/inspector/network/fetch-network-data.html:
  • http/tests/inspector/network/xhr-request-data-encoded-correctly.html:

Use singleFireEventListener instead of awaitEvent so that the follow-up event handlers
can be added synchronously instead of in a microtask. When the microtask happened later
than other incoming events then the follow-up handlers would have been added too late.

Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r216149 r216150  
     12017-05-03  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        LayoutTest http/tests/inspector/network/fetch-network-data.html is a flaky timeout
     4        https://bugs.webkit.org/show_bug.cgi?id=166038
     5        <rdar://problem/29488489>
     6
     7        Reviewed by Matt Baker.
     8
     9        * platform/mac/TestExpectations:
     10        * http/tests/inspector/network/fetch-network-data.html:
     11        * http/tests/inspector/network/xhr-request-data-encoded-correctly.html:
     12        Use singleFireEventListener instead of awaitEvent so that the follow-up event handlers
     13        can be added synchronously instead of in a microtask. When the microtask happened later
     14        than other incoming events then the follow-up handlers would have been added too late.
     15
    1162017-05-03  Matt Lewis  <jlewis3@apple.com>
    217
  • trunk/LayoutTests/http/tests/inspector/network/fetch-network-data.html

    r209734 r216150  
    1313            name, test(resolve, reject) {
    1414                InspectorTest.evaluateInPage(expression);
    15                 WebInspector.Frame.awaitEvent(WebInspector.Frame.Event.ResourceWasAdded).then((event) => {
     15                WebInspector.Frame.singleFireEventListener(WebInspector.Frame.Event.ResourceWasAdded, (event) => {
    1616                    let resource = event.data.resource;
    1717                    InspectorTest.expectEqual(resource.type, WebInspector.Resource.Type.Fetch, "Resource should be Fetch type.");
  • trunk/LayoutTests/http/tests/inspector/network/xhr-request-data-encoded-correctly.html

    r206130 r216150  
    1919        description: "XHR with request data is encoded correctly.",
    2020        test(resolve, reject) {
    21             WebInspector.Frame.awaitEvent(WebInspector.Frame.Event.ResourceWasAdded)
    22             .then((event) => {
     21            InspectorTest.evaluateInPage(`createXHRResource()`);
     22            WebInspector.Frame.singleFireEventListener(WebInspector.Frame.Event.ResourceWasAdded, (event) => {
    2323                let resource = event.data.resource;
    2424                InspectorTest.expectThat(resource instanceof WebInspector.Resource, "Resource should be created.");
    2525                InspectorTest.expectThat(resource.requestData === "utf8=👍", "Request data should have expected content.");
    26                 return resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFinish);
    27             })
    28             .then((event) => {
    29                 InspectorTest.pass("Resource load should finish.");
    30             })
    31             .then(resolve, reject);
    32 
    33             InspectorTest.evaluateInPage("createXHRResource()");
     26                resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFinish)
     27                    .then((event) => { InspectorTest.pass("Resource load should finish.") })
     28                    .then(resolve, reject);
     29                resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFail)
     30                    .then(() => { InspectorTest.fail("Resource should not have failed to load.") })
     31                    .then(reject, reject);
     32            });
    3433        }
    3534    });
     
    4039</head>
    4140<body onload="runTest()">
    42     <p>Tests XHR network resource payload is shown with correct encoding.</p>
     41<p>Tests XHR network resource payload is shown with correct encoding.</p>
    4342</body>
    4443</html>
  • trunk/LayoutTests/platform/mac/TestExpectations

    r216084 r216150  
    14561456webkit.org/b/164277 fast/preloader/image-srcset.html [ Pass Failure ]
    14571457
    1458 webkit.org/b/166038 http/tests/inspector/network/fetch-network-data.html [ Pass Timeout ]
    1459 webkit.org/b/164033 http/tests/inspector/network/xhr-request-data-encoded-correctly.html [ Pass Timeout ]
    1460 
    14611458webkit.org/b/165222 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry.htm [ Pass Failure ]
    14621459webkit.org/b/165222 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/idbindex-rename-abort.html [ Pass Failure ]
Note: See TracChangeset for help on using the changeset viewer.