Commit 0d18657b authored by pauljensen's avatar pauljensen Committed by Commit bot

[Cronet] Make some test infrastructure public rather than package-private.

There's no reason to have it package-private, and this prevents sharing with
tests in other packages (e.g. org.chromium.net.urlconnection).

BUG=629299
R=xunjieli
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2568213002
Cr-Commit-Position: refs/heads/master@{#437921}
parent 974f601a
...@@ -152,7 +152,7 @@ public class CronetTestBase extends AndroidTestCase { ...@@ -152,7 +152,7 @@ public class CronetTestBase extends AndroidTestCase {
} }
} }
void assertResponseEquals(UrlResponseInfo expected, UrlResponseInfo actual) { public void assertResponseEquals(UrlResponseInfo expected, UrlResponseInfo actual) {
assertEquals(expected.getAllHeaders(), actual.getAllHeaders()); assertEquals(expected.getAllHeaders(), actual.getAllHeaders());
assertEquals(expected.getAllHeadersAsList(), actual.getAllHeadersAsList()); assertEquals(expected.getAllHeadersAsList(), actual.getAllHeadersAsList());
assertEquals(expected.getHttpStatusCode(), actual.getHttpStatusCode()); assertEquals(expected.getHttpStatusCode(), actual.getHttpStatusCode());
...@@ -168,7 +168,7 @@ public class CronetTestBase extends AndroidTestCase { ...@@ -168,7 +168,7 @@ public class CronetTestBase extends AndroidTestCase {
} }
} }
static void assertContains(String expectedSubstring, String actualString) { public static void assertContains(String expectedSubstring, String actualString) {
assertNotNull(actualString); assertNotNull(actualString);
if (!actualString.contains(expectedSubstring)) { if (!actualString.contains(expectedSubstring)) {
fail("String [" + actualString + "] doesn't contain substring [" + expectedSubstring fail("String [" + actualString + "] doesn't contain substring [" + expectedSubstring
......
...@@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit; ...@@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit;
* method to block thread until the request completes on another thread. * method to block thread until the request completes on another thread.
* Allows to cancel, block request or throw an exception from an arbitrary step. * Allows to cancel, block request or throw an exception from an arbitrary step.
*/ */
class TestUrlRequestCallback extends UrlRequest.Callback { public class TestUrlRequestCallback extends UrlRequest.Callback {
public ArrayList<UrlResponseInfo> mRedirectResponseInfoList = new ArrayList<UrlResponseInfo>(); public ArrayList<UrlResponseInfo> mRedirectResponseInfoList = new ArrayList<UrlResponseInfo>();
public ArrayList<String> mRedirectUrlList = new ArrayList<String>(); public ArrayList<String> mRedirectUrlList = new ArrayList<String>();
public UrlResponseInfo mResponseInfo; public UrlResponseInfo mResponseInfo;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment