New issue
Advanced search Search tips

Issue 736775 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Fix URLDownloader and URLDownloaderTest

Project Member Reported by sdefresne@chromium.org, Jun 26 2017

Issue description

URLDownloader and the corresponding unit tests have the following problem:

- URLDownloader uses private inheritance from reading_list::ReadingListDistillerPageDelegate (forbidden, all inheritance should be public according to https://google.github.io/styleguide/cppguide.html#Inheritance)

- URLDownloader unit tests does not use the public API, but instead define a sub-class of URLDownloader that overrides random methods and is friend with the super class (this breaks the rule of unit tests that should only test the public API)

- URLDownloader unit tests use busy loop with timeout to wait for internal state of the sub-class of URLDownloader to change to detect that some condition happened (this introduce race-condition and this reveal that the public API of URLDownloader does not allow client to use it reliably).

The later point causes issue with TaskScheduler migration (as the race-condition is exhibited reliably causing the test to become flaky).
 
Components: Test>iOS
Sylvain, could you please update Component when you assigning the bug. Thanks!
Removing incorrect component. Test>iOS is for bugs that require change to the testing framework, this one does not, this is fixing code style violation for which there is no components.
Components: -Test>iOS
Labels: Hotlist-Needs-New-Component
If we want a component, then it should be reading list component.
Cc: eugene...@chromium.org
Components: UI>Browser>ReaderMode
Labels: -Hotlist-Needs-New-Component
According to UI>Browser>ReaderMode comments, this component represents both Reader Mode and Reading List.

Sign in to add a comment