Follow MockWebServer API changes.
Jeff Sharkey [Wed, 3 Apr 2013 17:13:32 +0000 (10:13 -0700)]
(cherry picked from commit 323f5ae0cafdc72f61defefaa5ba938f1b4d0dda)

Change-Id: I11627a5efebddf7b832bb63e6a7588accbc04fe8

tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java

index e59aff0..3b93738 100644 (file)
@@ -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")
index b6fd611..bde9581 100644 (file)
@@ -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));