summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSteve Howard <showard@google.com>2010-09-22 15:57:30 -0700
committerSteve Howard <showard@google.com>2010-09-22 18:31:44 -0700
commitebb555c0687061993dd6a22d15f6aab2437ee8c5 (patch)
tree6968836e8e8a549c51af802aeb31b551372a38f2 /tests
parentece96c7475696d8b447bb8523f4ad83c897002ea (diff)
downloadandroid_packages_providers_DownloadProvider-ebb555c0687061993dd6a22d15f6aab2437ee8c5.tar.gz
android_packages_providers_DownloadProvider-ebb555c0687061993dd6a22d15f6aab2437ee8c5.tar.bz2
android_packages_providers_DownloadProvider-ebb555c0687061993dd6a22d15f6aab2437ee8c5.zip
Support multi-valued HTTP headers, handle new API changes
* backend support for multiple values for the same HTTP headers, for corresponding API changes * other minor changes in response to DownloadManager API changes Change-Id: I7c595e94a60ed7afaca6cc3fb4c05aaeeff20c2a
Diffstat (limited to 'tests')
-rw-r--r--tests/public_api_access/src/com/android/providers/downloads/public_api_access_tests/PublicApiAccessTest.java4
-rw-r--r--tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/public_api_access/src/com/android/providers/downloads/public_api_access_tests/PublicApiAccessTest.java b/tests/public_api_access/src/com/android/providers/downloads/public_api_access_tests/PublicApiAccessTest.java
index 3929c59e..13bec33b 100644
--- a/tests/public_api_access/src/com/android/providers/downloads/public_api_access_tests/PublicApiAccessTest.java
+++ b/tests/public_api_access/src/com/android/providers/downloads/public_api_access_tests/PublicApiAccessTest.java
@@ -149,8 +149,8 @@ public class PublicApiAccessTest extends AndroidTestCase {
request.setAllowedOverRoaming(false);
request.setTitle("test");
request.setDescription("test");
- request.setMediaType("text/html");
- request.setRequestHeader("X-Some-Header", "value");
+ request.setMimeType("text/html");
+ request.addRequestHeader("X-Some-Header", "value");
mManager.enqueue(request);
}
}
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
index 6c81bc65..91cc3f3b 100644
--- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
@@ -306,8 +306,8 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
public void testRequestHeaders() throws Exception {
enqueueEmptyResponse(HTTP_OK);
- Download download = enqueueRequest(getRequest().setRequestHeader("Header1", "value1")
- .setRequestHeader("Header2", "value2"));
+ Download download = enqueueRequest(getRequest().addRequestHeader("Header1", "value1")
+ .addRequestHeader("Header2", "value2"));
download.runUntilStatus(DownloadManager.STATUS_SUCCESSFUL);
List<String> headers = takeRequest().getHeaders();
@@ -316,7 +316,7 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
}
public void testDelete() throws Exception {
- Download download = enqueueRequest(getRequest().setRequestHeader("header", "value"));
+ Download download = enqueueRequest(getRequest().addRequestHeader("header", "value"));
mManager.remove(download.mId);
Cursor cursor = mManager.query(new DownloadManager.Query());
try {