fix: expect Network.responseReceived event is never dispatched (#3233)

Fixes #2888.
This commit is contained in:
Andrey Lushnikov 2018-09-12 22:08:32 +01:00 committed by GitHub
parent c644a3bbd3
commit 7ec0801729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,7 +249,11 @@ class NetworkManager extends EventEmitter {
// @see https://crbug.com/750469
if (!request)
return;
request.response()._bodyLoadedPromiseFulfill.call(null);
// Under certain conditions we never get the Network.responseReceived
// event from protocol. @see https://crbug.com/883475
if (request.response())
request.response()._bodyLoadedPromiseFulfill.call(null);
this._requestIdToRequest.delete(request._requestId);
this._attemptedAuthentications.delete(request._interceptionId);
this.emit(NetworkManager.Events.RequestFinished, request);