New issue
Advanced search Search tips

Issue 896796 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 29
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DownloadProtectionServiceTest.CheckClientDownloadValidateRequestTabHistory is slow

Project Member Reported by csharrison@chromium.org, Oct 18

Issue description

Labels: SafeBrowsing-Triaged
Owner: drubery@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/155b96f5a3c776620e4e122c1a127137752e1769

commit 155b96f5a3c776620e4e122c1a127137752e1769
Author: Daniel Rubery <drubery@chromium.org>
Date: Mon Oct 29 16:04:54 2018

Fix long unit tests in DownloadProtectionServiceTest

We had a few tests that wanted to inspect the ClientDownloadRequest,
but didn't do anything with the TestURLLoaderFactory. This led to the
test waiting for 7 seconds, until the timeout kicks in. This CL adds
calls to PrepareResponse, to mock out the network response, so that
we no longer wait for a timeout. All unit tests under
DownloadProtectionServiceTest now take <1s, with the worst around 200ms.

Bug:  896796 
Change-Id: I1c8f24c962fbb5d13e2a86ecfda6f80c1d19d1f4
Reviewed-on: https://chromium-review.googlesource.com/c/1299502
Reviewed-by: Nathan Parker <nparker@chromium.org>
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603511}
[modify] https://crrev.com/155b96f5a3c776620e4e122c1a127137752e1769/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
[modify] https://crrev.com/155b96f5a3c776620e4e122c1a127137752e1769/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment