From 23357198c440e6872d3aef3e608295db7f8273bc Mon Sep 17 00:00:00 2001 From: Steve Howard Date: Tue, 22 Jun 2010 18:20:55 -0700 Subject: Stub out the system clock in the download manager, add tests Introduce SystemFacade, an interface that allows us to stub out the system clock for testing the download manager. This allows us to test retrying a failed download without having the test wait 60 seconds. This interface can include other dependencies in the future as well. I've also used this to add tests for 503 (retry-after) and 301 (redirect), and I've added a test for download to the cache partition. Other changes: * made MockWebServer capable of checking + rethrowing exceptions from child threads * refactoring + cleanup of DownloadManagerFunctionalTest --- Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 0e740a66..c7225375 100644 --- a/Android.mk +++ b/Android.mk @@ -8,6 +8,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME := DownloadProvider LOCAL_CERTIFICATE := media +LOCAL_STATIC_JAVA_LIBRARIES := guava include $(BUILD_PACKAGE) -- cgit v1.2.3