Index: net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java |
diff --git a/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java b/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java |
index 9bb024ef24b27207a52e0a10035e3cea8eaf56bb..dd40220a5564fc9b9cdfc654f86294b6d026b690 100644 |
--- a/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java |
+++ b/net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java |
@@ -80,14 +80,11 @@ |
final boolean mIsRedirect; |
final Runnable mResponseAction; |
final boolean mIsNotFound; |
- final boolean mIsNoContent; |
Response(byte[] responseData, List<Pair<String, String>> responseHeaders, |
- boolean isRedirect, boolean isNotFound, boolean isNoContent, |
- Runnable responseAction) { |
+ boolean isRedirect, boolean isNotFound, Runnable responseAction) { |
mIsRedirect = isRedirect; |
mIsNotFound = isNotFound; |
- mIsNoContent = isNoContent; |
mResponseData = responseData; |
mResponseHeaders = responseHeaders == null |
? new ArrayList<Pair<String, String>>() : responseHeaders; |
@@ -211,7 +208,6 @@ |
private static final int RESPONSE_STATUS_NORMAL = 0; |
private static final int RESPONSE_STATUS_MOVED_TEMPORARILY = 1; |
private static final int RESPONSE_STATUS_NOT_FOUND = 2; |
- private static final int RESPONSE_STATUS_NO_CONTENT = 3; |
private String setResponseInternal( |
String requestPath, byte[] responseData, |
@@ -219,12 +215,10 @@ |
int status) { |
final boolean isRedirect = (status == RESPONSE_STATUS_MOVED_TEMPORARILY); |
final boolean isNotFound = (status == RESPONSE_STATUS_NOT_FOUND); |
- final boolean isNoContent = (status == RESPONSE_STATUS_NO_CONTENT); |
synchronized (mLock) { |
mResponseMap.put(requestPath, new Response( |
- responseData, responseHeaders, isRedirect, isNotFound, isNoContent, |
- responseAction)); |
+ responseData, responseHeaders, isRedirect, isNotFound, responseAction)); |
mResponseCountMap.put(requestPath, Integer.valueOf(0)); |
mLastRequestMap.put(requestPath, null); |
} |
@@ -254,19 +248,6 @@ |
String requestPath) { |
return setResponseInternal(requestPath, "".getBytes(), null, null, |
RESPONSE_STATUS_NOT_FOUND); |
- } |
- |
- /** |
- * Sets a 204 (no content) response to be returned when a particular request path is passed in. |
- * |
- * @param requestPath The path to respond to. |
- * @return The full URL including the path that should be requested to get the expected |
- * response. |
- */ |
- public String setResponseWithNoContentStatus( |
- String requestPath) { |
- return setResponseInternal(requestPath, "".getBytes(), null, null, |
- RESPONSE_STATUS_NO_CONTENT); |
} |
/** |
@@ -469,10 +450,6 @@ |
httpResponse = createResponse(HttpStatus.SC_NOT_FOUND); |
} else if (response.mIsNotFound) { |
httpResponse = createResponse(HttpStatus.SC_NOT_FOUND); |
- servedResponseFor(path, request); |
- } else if (response.mIsNoContent) { |
- httpResponse = createResponse(HttpStatus.SC_NO_CONTENT); |
- httpResponse.setHeader("Content-Length", "0"); |
servedResponseFor(path, request); |
} else if (response.mIsRedirect) { |
httpResponse = createResponse(HttpStatus.SC_MOVED_TEMPORARILY); |