Migrate ExtensionDownloader to SimpleURLLoader
In order to keep the extensive unittests set functional, a couple of extensions were made, apart from the migration itself. Remarkably: - Added a new method to ExtensionDownloaderDelegate class, ::OnExtensionDownloadRetryForTests, used exclusively for tests. Basically, *various* unit tests in ExtensionUpdaterTest (namely TestSingleExtensionDownloading* and ProtectedDownload*) perform intentional load failures/retries, where resource request parameters and load results are set up and verified differently for each load fail/retry sequence. Prior to this CL, with URLFetcher, tests could control when to call URLFetcherDelegate::OnURLFetchComplete. In SimpleURLLoader worlds, we can not really control when the "load complete" callback is called, since it is a mojo call. Hence, this testing-only API was added so that tests can more fine-grained control when loads are triggered. BUG=773295 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: Ife6f51837648036c8b96dbedcb093113be2fc987 Reviewed-on: https://chromium-review.googlesource.com/1066370 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Reviewed-by:
Minh Nguyen <mxnguyen@chromium.org> Reviewed-by:
Matt Menke <mmenke@chromium.org> Reviewed-by:
Alexander Alekseev <alemate@chromium.org> Cr-Commit-Position: refs/heads/master@{#581322}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment