| Index: third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html b/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html
|
| index 2d0c3a5327051b52ccb4da7e7194712ae3ce85e8..e7ed7c852ac475b86457b19fb9152b808b9b571d 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/network/resource-type.html
|
| @@ -13,6 +13,7 @@ function appendIframe()
|
| function test()
|
| {
|
| InspectorTest.eventHandler["Network.responseReceived"] = onResponseReceived;
|
| + InspectorTest.eventHandler["Network.loadingFinished"] = onLoadingFinished;
|
|
|
| function enableNetwork()
|
| {
|
| @@ -60,10 +61,7 @@ function test()
|
| }
|
| resource.gotType = type;
|
| resource.gotUrl = url;
|
| - if ("responseAvailable" in resource)
|
| - onResponseReady();
|
| - else
|
| - InspectorTest.sendCommand("Network.getResponseBody", { "requestId": requestId }, onResponseBody.bind(null, resource));
|
| + resource.requestId = requestId;
|
| return;
|
| }
|
| }
|
| @@ -71,6 +69,21 @@ function test()
|
| InspectorTest.completeTest();
|
| }
|
|
|
| + function onLoadingFinished(event)
|
| + {
|
| + const requestId = event.params.requestId;
|
| + for (const resource of resources) {
|
| + if (resource.requestId !== requestId) {
|
| + continue;
|
| + }
|
| + if ("responseAvailable" in resource) {
|
| + onResponseReady();
|
| + } else {
|
| + InspectorTest.sendCommand("Network.getResponseBody", { "requestId": requestId }, onResponseBody.bind(null, resource));
|
| + }
|
| + }
|
| + }
|
| +
|
| function onResponseReady()
|
| {
|
| resourcesLeft -= 1;
|
|
|