New issue
Advanced search Search tips

Issue 879348 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 6
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

ChromeDownloadManagerDelegateTest.LastSavePath times out

Project Member Reported by rmcelrath@chromium.org, Aug 30

Issue description

As of 2cb53ba1f4b6 (Aug 30, 2018), ChromeDownloadManagerDelegateTest.LastSavePath times out on linux when run with other tests.

See https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=unit_tests&tests=ChromeDownloadManagerDelegateTest.LastSavePath
or run out/Default/unit_tests '--gtest_filter=PageLoadCappingInfoBarDelegateTest.ClickingCreatesNewInfobar:ChromeDownloadManagerDelegateTest.LastSavePath'

The timeout happens if the test is run after any other test that instantiates the g_default_download_directory singleton, which happens to be any test that creates a TestingProfile (maybe others too). The LastSavePath test needs to override the value of the default download path preference, but it needs to be the one creating g_default_download_directory in order to do that. Because previous tests have already created the singleton, it will have the wrong value in the LastSavePath test, causing it to time out.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 6

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

commit e899dc9914cdcc9b45a9055f8d5248922c926c95
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Thu Sep 06 20:53:25 2018

Fix timeout in ChromeDownloadManagerDelegateTest.LastSavePath.

See  https://crbug.com/879348  for a description of the issue. This CL
adds a DownloadPrefs::ReinitializeDefaultDownloadDirectoryForTesting()
method to force the global DefaultDownloadDirectory instance to
reinitialize itself to take into account any test configurations.

Bug:  879348 
Change-Id: I4a2340fad5f1396196e6746073857d3a09bfa7c1
Reviewed-on: https://chromium-review.googlesource.com/1197724
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589291}
[modify] https://crrev.com/e899dc9914cdcc9b45a9055f8d5248922c926c95/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
[modify] https://crrev.com/e899dc9914cdcc9b45a9055f8d5248922c926c95/chrome/browser/download/download_prefs.cc
[modify] https://crrev.com/e899dc9914cdcc9b45a9055f8d5248922c926c95/chrome/browser/download/download_prefs.h

Status: Fixed (was: Started)

Sign in to add a comment