Changeset 206263 in webkit


Ignore:
Timestamp:
Sep 22, 2016 11:19:49 AM (8 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r206112.

This change made inspector/network/xhr-json-blob-has-
content.html very flaky.

Reverted changeset:

"Web Inspector: adopt Object.awaitEvent in
LayoutTests/inspector/network"
https://bugs.webkit.org/show_bug.cgi?id=162099
http://trac.webkit.org/changeset/206112

Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206262 r206263  
     12016-09-22  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r206112.
     4
     5        This change made inspector/network/xhr-json-blob-has-
     6        content.html very flaky.
     7
     8        Reverted changeset:
     9
     10        "Web Inspector: adopt Object.awaitEvent in
     11        LayoutTests/inspector/network"
     12        https://bugs.webkit.org/show_bug.cgi?id=162099
     13        http://trac.webkit.org/changeset/206112
     14
    1152016-09-22  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/LayoutTests/inspector/network/client-blocked-load-expected.txt

    r206112 r206263  
    55-- Running test case: TriggerBlockedResourceLoad
    66PASS: Resource should be created.
    7 PASS: Added Resource load did fail.
    87PASS: Request url should be rewritten to the null string.
     8PASS: Resource load should fail.
    99
  • trunk/LayoutTests/inspector/network/client-blocked-load.html

    r206112 r206263  
    1919        name: "TriggerBlockedResourceLoad",
    2020        description: "Trigger a blocked resource load and ensure we get notified of the request.",
    21         test(resolve, reject) {
    22             Promise.all([
    23                 WebInspector.Frame.awaitEvent(WebInspector.Frame.Event.ResourceWasAdded),
    24                 WebInspector.Resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFail)
    25             ])
    26             .then(([resourceWasAddedEvent, loadingDidFailEvent]) => {
    27                 let resource = resourceWasAddedEvent.data.resource;
     21        test: (resolve, reject) => {
     22            InspectorTest.evaluateInPage("createBlockedResourceLoad()");
     23            WebInspector.Frame.singleFireEventListener(WebInspector.Frame.Event.ResourceWasAdded, (event) => {
     24                let resource = event.data.resource;
    2825                InspectorTest.expectThat(resource instanceof WebInspector.Resource, "Resource should be created.");
    29                 InspectorTest.expectThat(resource === loadingDidFailEvent.target, "Added Resource load did fail.");
    3026                InspectorTest.expectThat(resource.url === "", "Request url should be rewritten to the null string.");
    31             })
    32             .then(resolve, reject);
    33 
    34             InspectorTest.evaluateInPage("createBlockedResourceLoad()");
     27                resource.singleFireEventListener(WebInspector.Resource.Event.LoadingDidFail, (event) => {
     28                    InspectorTest.pass("Resource load should fail.");
     29                    resolve();
     30                });
     31            });
    3532        }
    3633    });
  • trunk/LayoutTests/inspector/network/xhr-json-blob-has-content.html

    r206112 r206263  
    2626        name: "XHR.JSONContent",
    2727        description: "Ensure an XMLHttpRequest with JSON content still gives us text.",
    28         test(resolve, reject) {
    29             let resource = null;
    30 
    31             WebInspector.Frame.awaitEvent(WebInspector.Frame.Event.ResourceWasAdded)
    32             .then((event) => {
    33                 resource = event.data.resource;
     28        test: (resolve, reject) => {
     29            InspectorTest.evaluateInPage("createJSONXHR()");
     30            WebInspector.Frame.singleFireEventListener(WebInspector.Frame.Event.ResourceWasAdded, (event) => {
     31                let resource = event.data.resource;
    3432                InspectorTest.expectThat(resource instanceof WebInspector.Resource, "Resource should be created.");
    35                 return resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFinish);
    36             })
    37             .then((event) => {
    38                 InspectorTest.pass("Resource should complete loading.");
    39                 return resource.requestContent();
    40             })
    41             .then((resource) => {
    42                 InspectorTest.expectThat(resource.content === jsonContent, "Resource has expected content.");
    43             })
    44             .then(resolve, reject);
    45 
    46             InspectorTest.evaluateInPage("createJSONXHR()");
     33                resource.singleFireEventListener(WebInspector.Resource.Event.LoadingDidFinish, (event) => {
     34                    InspectorTest.pass("Resource should complete loading.");
     35                    resource.requestContent().then(() => {
     36                        InspectorTest.expectThat(resource.content === jsonContent, "Resource has expected content.");
     37                    }).then(resolve, reject);
     38                });
     39            });
    4740        }
    4841    });
     
    5144        name: "XHR.JSONContent.Blob",
    5245        description: "Ensure an XMLHttpRequest with JSON content and a responseType of blob still gives us text.",
    53         test(resolve, reject) {
    54             let resource = null;
    55 
    56             WebInspector.Frame.awaitEvent(WebInspector.Frame.Event.ResourceWasAdded)
    57             .then((event) => {
    58                 resource = event.data.resource;
     46        test: (resolve, reject) => {
     47            InspectorTest.evaluateInPage("createJSONBlobXHR()");
     48            WebInspector.Frame.singleFireEventListener(WebInspector.Frame.Event.ResourceWasAdded, (event) => {
     49                let resource = event.data.resource;
    5950                InspectorTest.expectThat(resource instanceof WebInspector.Resource, "Resource should be created.");
    60                 return resource.awaitEvent(WebInspector.Resource.Event.LoadingDidFinish);
    61             })
    62             .then((event) => {
    63                 InspectorTest.pass("Resource should complete loading.");
    64                 return resource.requestContent();
    65             })
    66             .then((resource) => {
    67                 InspectorTest.expectThat(resource.content === jsonContent, "Resource has expected content.");
    68             })
    69             .then(resolve, reject);
    70 
    71             InspectorTest.evaluateInPage("createJSONBlobXHR()");
     51                resource.singleFireEventListener(WebInspector.Resource.Event.LoadingDidFinish, (event) => {
     52                    InspectorTest.pass("Resource should complete loading.");
     53                    resource.requestContent().then(() => {
     54                        InspectorTest.expectThat(resource.content === jsonContent, "Resource has expected content.");
     55                    }).then(resolve, reject);
     56                });
     57            });
    7258        }
    7359    });
Note: See TracChangeset for help on using the changeset viewer.