summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-04-03 10:13:32 -0700
committerJeff Sharkey <jsharkey@android.com>2013-04-03 10:13:32 -0700
commit323f5ae0cafdc72f61defefaa5ba938f1b4d0dda (patch)
treea21df048fee9aa2c6022bf6f679f675363599d1e
parentdd4ad071cf60bc5f7ccdd95dd801704f8892a3e8 (diff)
downloadandroid_packages_providers_DownloadProvider-323f5ae0cafdc72f61defefaa5ba938f1b4d0dda.zip
android_packages_providers_DownloadProvider-323f5ae0cafdc72f61defefaa5ba938f1b4d0dda.tar.gz
android_packages_providers_DownloadProvider-323f5ae0cafdc72f61defefaa5ba938f1b4d0dda.tar.bz2
Follow MockWebServer API changes.
Change-Id: Icaba016bc6e098745e56a3b6367a8a6af0151158
-rw-r--r--tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java5
-rw-r--r--tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java3
2 files changed, 1 insertions, 7 deletions
diff --git a/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java b/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
index e59aff0..3b93738 100644
--- a/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
@@ -34,7 +34,6 @@ import android.test.mock.MockContentResolver;
import android.util.Log;
import com.google.mockwebserver.MockResponse;
-import com.google.mockwebserver.MockStreamResponse;
import com.google.mockwebserver.MockWebServer;
import com.google.mockwebserver.RecordedRequest;
import com.google.mockwebserver.SocketPolicy;
@@ -221,10 +220,6 @@ public abstract class AbstractDownloadProviderFunctionalTest extends
mServer.enqueue(resp);
}
- void enqueueResponse(MockStreamResponse resp) {
- mServer.enqueue(resp);
- }
-
MockResponse buildResponse(int status, String body) {
return new MockResponse().setResponseCode(status).setBody(body)
.setHeader("Content-type", "text/plain")
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
index b6fd611..bde9581 100644
--- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
@@ -50,7 +50,6 @@ import android.test.suitebuilder.annotation.Suppress;
import android.text.format.DateUtils;
import com.google.mockwebserver.MockResponse;
-import com.google.mockwebserver.MockStreamResponse;
import com.google.mockwebserver.RecordedRequest;
import com.google.mockwebserver.SocketPolicy;
@@ -141,7 +140,7 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
final long length = 3 * GB_IN_BYTES;
final InputStream body = new FakeInputStream(length);
- enqueueResponse(new MockStreamResponse().setResponseCode(HTTP_OK).setBody(body, length)
+ enqueueResponse(new MockResponse().setResponseCode(HTTP_OK).setBody(body, length)
.setHeader("Content-type", "text/plain")
.setSocketPolicy(SocketPolicy.DISCONNECT_AT_END));