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

Side by Side Diff: components/cronet/android/test/src/org/chromium/net/NativeTestServer.java

Issue 2164863002: Fix CronetHttpURLConnectionTest#testServerHangsUp flake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comment Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « components/cronet/android/test/native_test_server.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.annotations.JNINamespace; 9 import org.chromium.base.annotations.JNINamespace;
10 import org.chromium.base.test.util.UrlUtils; 10 import org.chromium.base.test.util.UrlUtils;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 public static String getFileURL(String filePath) { 51 public static String getFileURL(String filePath) {
52 return nativeGetFileURL(filePath); 52 return nativeGetFileURL(filePath);
53 } 53 }
54 54
55 public static String getSdchURL() { 55 public static String getSdchURL() {
56 return nativeGetSdchURL(); 56 return nativeGetSdchURL();
57 } 57 }
58 58
59 // Returns a URL that the server will return an Exabyte of data
60 public static String getExabyteResponseURL() {
61 return nativeGetExabyteResponseURL();
62 }
63
59 // The following URLs will make NativeTestServer serve a response based on 64 // The following URLs will make NativeTestServer serve a response based on
60 // the contents of the corresponding file and its mock-http-headers file. 65 // the contents of the corresponding file and its mock-http-headers file.
61 66
62 public static String getSuccessURL() { 67 public static String getSuccessURL() {
63 return nativeGetFileURL("/success.txt"); 68 return nativeGetFileURL("/success.txt");
64 } 69 }
65 70
66 public static String getRedirectURL() { 71 public static String getRedirectURL() {
67 return nativeGetFileURL("/redirect.html"); 72 return nativeGetFileURL("/redirect.html");
68 } 73 }
(...skipping 16 matching lines...) Expand all
85 90
86 private static native boolean nativeStartNativeTestServer(String filePath, S tring testDataDir); 91 private static native boolean nativeStartNativeTestServer(String filePath, S tring testDataDir);
87 private static native void nativeShutdownNativeTestServer(); 92 private static native void nativeShutdownNativeTestServer();
88 private static native String nativeGetEchoBodyURL(); 93 private static native String nativeGetEchoBodyURL();
89 private static native String nativeGetEchoHeaderURL(String header); 94 private static native String nativeGetEchoHeaderURL(String header);
90 private static native String nativeGetEchoAllHeadersURL(); 95 private static native String nativeGetEchoAllHeadersURL();
91 private static native String nativeGetEchoMethodURL(); 96 private static native String nativeGetEchoMethodURL();
92 private static native String nativeGetRedirectToEchoBody(); 97 private static native String nativeGetRedirectToEchoBody();
93 private static native String nativeGetFileURL(String filePath); 98 private static native String nativeGetFileURL(String filePath);
94 private static native String nativeGetSdchURL(); 99 private static native String nativeGetSdchURL();
100 private static native String nativeGetExabyteResponseURL();
95 private static native String nativeGetHostPort(); 101 private static native String nativeGetHostPort();
96 private static native boolean nativeIsDataReductionProxySupported(); 102 private static native boolean nativeIsDataReductionProxySupported();
97 } 103 }
OLDNEW
« no previous file with comments | « components/cronet/android/test/native_test_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698