Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1037)

Unified Diff: net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java

Issue 958933002: Revert of [Android WebView] Synthesize a fake page loading event on page source modification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/invalidate_type.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « content/public/browser/invalidate_type.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698