Home
last modified time | relevance | path

Searched refs:MockResponse (Results 1 – 5 of 5) sorted by relevance

/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DAbstractDownloadProviderFunctionalTest.java47 import com.google.mockwebserver.MockResponse;
271 void enqueueResponse(MockResponse resp) { in enqueueResponse()
275 MockResponse buildResponse(int status, String body) { in buildResponse()
276 return new MockResponse().setResponseCode(status).setBody(body) in buildResponse()
281 MockResponse buildResponse(int status, byte[] body) { in buildResponse()
282 return new MockResponse().setResponseCode(status).setBody(body) in buildResponse()
287 MockResponse buildEmptyResponse(int status) { in buildEmptyResponse()
DThreadingTest.java27 import com.google.mockwebserver.MockResponse;
56 enqueueResponse(new MockResponse().setResponseCode(HTTP_OK).setBody(body) in testFilenameRace()
DPublicApiFunctionalTest.java57 import com.google.mockwebserver.MockResponse;
147 enqueueResponse(new MockResponse().setResponseCode(HTTP_OK).setBody(body, length) in testExtremelyLarge()
225 private MockResponse buildPartialResponse(int start, int end) { in buildPartialResponse()
229 MockResponse response = buildResponse(status, FILE_CONTENT.substring(start, end)) in buildPartialResponse()
242 private MockResponse buildContinuingResponse() { in buildContinuingResponse()
/packages/modules/CaptivePortalLogin/tests/src/com/android/captiveportallogin/
DCaptivePortalLoginActivityTest.java675 private final HashMap<String, MockResponse> mResponses = new HashMap<>();
677 private static final class MockResponse { class in CaptivePortalLoginActivityTest.HttpServer
682 MockResponse(String body, String mimetype, Map<String, String> headers) { in MockResponse() method in CaptivePortalLoginActivityTest.HttpServer.MockResponse
722 mResponses.put(query, new MockResponse(body, mimetype, headers)); in setResponse()
727 final MockResponse mockResponse = mResponses.get(session.getQueryParameterString()); in serve()
/packages/apps/KeyChain/tests/src/com/android/keychain/tests/
DKeyChainTestActivity.java47 import com.google.mockwebserver.MockResponse;
203 server.enqueue(new MockResponse().setBody("this response comes via HTTPS")); in startWebServer()