Skip to content

Commit

Permalink
Fix PageLoadMetricsBrowserTest.ReceivedCompleteResources with network…
Browse files Browse the repository at this point in the history
… service

We need to notify download progress even if report_raw_headers is not
set.

Bug: 875298
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I1074a50ca60cdbbb00cd265d83487abe55160732
Reviewed-on: https://chromium-review.googlesource.com/1184038
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585052}
  • Loading branch information
clarkduvall authored and Commit Bot committed Aug 22, 2018
1 parent 29c1d49 commit 40d057e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions services/network/url_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,9 @@ void URLLoader::DidRead(int num_bytes, bool completed_synchronously) {
if (num_bytes > 0) {
pending_write_buffer_offset_ += num_bytes;

// Only notify client of download progress in case DevTools are attached
// and we're done sniffing and started sending response.
if (report_raw_headers_ && !consumer_handle_.is_valid()) {
// Only notify client of download progress if we're done sniffing and
// started sending response.
if (!consumer_handle_.is_valid()) {
int64_t total_encoded_bytes = url_request_->GetTotalReceivedBytes();
int64_t delta = total_encoded_bytes - reported_total_encoded_bytes_;
DCHECK_LE(0, delta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@

# https://crbug.com/816684 Track Page Load Metrics.
-PageLoadMetricsBrowserTest.LoadingMetricsFailed
-PageLoadMetricsBrowserTest.ReceivedCompleteResources

# https://crbug.com/810329 DnsProbe browsertests that rely on delaying requests:
-DnsProbeBrowserTest.NxdomainProbeResultWithWorkingSlowCorrections
Expand Down

0 comments on commit 40d057e

Please sign in to comment.