New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 762529 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 760924
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

PlzNavigate: inspector/network/network-datareceived.html number of byte received mismatch

Project Member Reported by arthurso...@chromium.org, Sep 6 2017

Issue description

With PlzNavigate(--enable-browser-side-navigation), the layout test: http/tests/inspector/network/network-datareceived.html fails.

There is a mismatch between encodedBytesReceived(=323) and encodedDataLength(=50323).
I am investigating...
 
Cc: yhirano@chromium.org
I think I understand the issue.

This test probably started failing with PlzNavigate since this series of CL:
https://codereview.chromium.org/2510333002

|encoded_data_length| stopped being sent in OnReceivedData, but is now sent separately since:
https://codereview.chromium.org/2519893002
This doc is interesting: https://docs.google.com/document/d/1Q-LpTPcV8QApeXSL24MVZHjP-uQK7RAK300t_qZaGFQ/edit#heading=h.cq4slq8hi7q7

With PlzNavigate, it is not sent.
As far as I understand, we probably need the async_resource_handler to send OnTransferSizeUpdated messages.
I found a CL that does exactly what I would like to do, but in the mojo_async_resource_handler:
https://codereview.chromium.org/2566943002
+CC yhirano: FYI
I will probably try to do something similar.



Components: Blink>Loader
Yes, you need to send the message. But I don't understand what you mean by "we probably need the async_resource_handler to send OnTransferSizeUpdated messages". Are you using mojo on content::AsyncResourceHandler?
Mergedinto: 760924
Status: Duplicate (was: Started)
Yes you are right. I was not aware that LoadingWithMojo was enabled by default. Thanks!
So I have a much simpler explanation for this bug:

In MojoAsyncResourceHandler::OnReadCompleted():
```
  const ResourceRequestInfoImpl* info = GetRequestInfo();
  if (info->ShouldReportRawHeaders()) {
    auto transfer_size_diff = CalculateRecentlyReceivedBytes();
    if (transfer_size_diff > 0)
      url_loader_client_->OnTransferSizeUpdated(transfer_size_diff);
  }

```

OnTransferSizeUpdated is sent only if ShouldReportRawHeaders is enabled. It is enabled in InspectorNetworkAgent::WillSendRequest(). The latter is not called before the request is sent with PlzNavigate.

It means this bug is a duplicate of  issue 760924 .

Sign in to add a comment