As the DownloadService is becoming available to for different components, it is important to provide a TestDownloadService that they can use for their testing purposes. For example, OfflinePrefetch currently has implemented their own version of a TestDownloadService. This implementation draws inspiration from the functionality available in that version, while also providing a shared implementation for future components to use and extend.
Bug: 736231 Change-Id: I87358ce54ca8055e788df9bf3877dbd9d9b3385a Reviewed-on: https://chromium-review.googlesource.com/567585 Commit-Queue: Joy Ming
0dd889e0c Build fake DownloadService for testing.
components/download/internal/test/BUILD.gn | 4 +
.../internal/test/mock_download_service.cc | 15 +++
.../download/internal/test/mock_download_service.h | 43 ++++++
.../internal/test/test_download_service.cc | 145 +++++++++++++++++++++
.../download/internal/test/test_download_service.h | 76 +++++++++++
5 files changed, 283 insertions(+)