cronet: align cronet test naming with API

Since the API was renamed, remove all mentions of cronet from tests.

Test: TH
Change-Id: I4636f971a70f45d8b12c053989bf353bd0471c26
This commit is contained in:
Patrick Rohr
2023-01-24 02:44:38 -08:00
parent 05c1ac573a
commit d6bb61859e
2 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class CronetEngineTest { public class HttpEngineTest {
private static final String HOST = "source.android.com"; private static final String HOST = "source.android.com";
private static final String URL = "https://" + HOST; private static final String URL = "https://" + HOST;
@@ -63,7 +63,7 @@ public class CronetEngineTest {
} }
@Test @Test
public void testCronetEngine_Default() throws Exception { public void testHttpEngine_Default() throws Exception {
mEngine = mEngineBuilder.build(); mEngine = mEngineBuilder.build();
UrlRequest.Builder builder = UrlRequest.Builder builder =
mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor()); mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor());
@@ -76,7 +76,7 @@ public class CronetEngineTest {
} }
@Test @Test
public void testCronetEngine_DisableHttp2() throws Exception { public void testHttpEngine_DisableHttp2() throws Exception {
mEngine = mEngineBuilder.setEnableHttp2(false).build(); mEngine = mEngineBuilder.setEnableHttp2(false).build();
UrlRequest.Builder builder = UrlRequest.Builder builder =
mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor()); mEngine.newUrlRequestBuilder(URL, mCallback, mCallback.getExecutor());
@@ -89,7 +89,7 @@ public class CronetEngineTest {
} }
@Test @Test
public void testCronetEngine_EnableQuic() throws Exception { public void testHttpEngine_EnableQuic() throws Exception {
// The hint doesn't guarantee that QUIC will win the race, just that it will race TCP. // The hint doesn't guarantee that QUIC will win the race, just that it will race TCP.
// If this ends up being flaky, consider sending multiple requests. // If this ends up being flaky, consider sending multiple requests.
mEngine = mEngineBuilder.setEnableQuic(true).addQuicHint(HOST, 443, 443).build(); mEngine = mEngineBuilder.setEnableQuic(true).addQuicHint(HOST, 443, 443).build();
@@ -104,7 +104,7 @@ public class CronetEngineTest {
} }
@Test @Test
public void testCronetEngine_GetDefaultUserAgent() throws Exception { public void testHttpEngine_GetDefaultUserAgent() throws Exception {
assertThat(mEngineBuilder.getDefaultUserAgent(), containsString("AndroidHttpClient")); assertThat(mEngineBuilder.getDefaultUserAgent(), containsString("AndroidHttpClient"));
} }
} }

View File

@@ -41,7 +41,7 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class CronetUrlRequestTest { public class UrlRequestTest {
private TestUrlRequestCallback mCallback; private TestUrlRequestCallback mCallback;
private HttpCtsTestServer mTestServer; private HttpCtsTestServer mTestServer;
private HttpEngine mHttpEngine; private HttpEngine mHttpEngine;