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

Unified Diff: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java

Issue 2839413003: Delete Cronet Data Reduction Proxy integration (Closed)
Patch Set: Created 3 years, 8 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
Index: components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java
index b9cc1cd87222815347abc41ef0f713af5c662617..afaf89932175462a21e77f9dfe12b53481e02eb7 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java
@@ -190,49 +190,6 @@ public class CronetUrlRequestContextTest extends CronetTestBase {
@SmallTest
@Feature({"Cronet"})
- @OnlyRunNativeCronet
- public void testDataReductionProxyEnabled() throws Exception {
- final CronetTestFramework testFramework = startCronetTestFrameworkAndSkipLibraryInit();
-
- // Ensure native code is loaded before trying to start test server.
- new ExperimentalCronetEngine.Builder(getContext()).build().shutdown();
-
- assertTrue(NativeTestServer.startNativeTestServer(getContext()));
- if (!NativeTestServer.isDataReductionProxySupported()) {
- return;
- }
- String serverHostPort = NativeTestServer.getHostPort();
-
- // Enable the Data Reduction Proxy and configure it to use the test
- // server as its primary proxy, and to check successfully that this
- // proxy is OK to use.
- ExperimentalCronetEngine.Builder cronetEngineBuilder =
- new ExperimentalCronetEngine.Builder(getContext());
- cronetEngineBuilder.enableDataReductionProxy("test-key");
- cronetEngineBuilder.setDataReductionProxyOptions(serverHostPort, "unused.net:9999",
- NativeTestServer.getFileURL("/secureproxychecksuccess.txt"));
- testFramework.mCronetEngine = (CronetEngineBase) cronetEngineBuilder.build();
- TestUrlRequestCallback callback = new TestUrlRequestCallback();
-
- // Construct and start a request that can only be returned by the test
- // server. This request will fail if the configuration logic for the
- // Data Reduction Proxy is not used.
- UrlRequest.Builder urlRequestBuilder = testFramework.mCronetEngine.newUrlRequestBuilder(
- "http://DomainThatDoesnt.Resolve/datareductionproxysuccess.txt", callback,
- callback.getExecutor());
- urlRequestBuilder.build().start();
- callback.blockForDone();
-
- // Verify that the request is successful and that the Data Reduction
- // Proxy logic configured to use the test server as its proxy.
- assertEquals(200, callback.mResponseInfo.getHttpStatusCode());
- assertEquals(serverHostPort, callback.mResponseInfo.getProxyServer());
- assertEquals("http://DomainThatDoesnt.Resolve/datareductionproxysuccess.txt",
- callback.mResponseInfo.getUrl());
- }
-
- @SmallTest
- @Feature({"Cronet"})
@DisabledTest(message = "Disabled due to flaky assert. See crbug.com/710626")
public void testRealTimeNetworkQualityObservationsNotEnabled() throws Exception {
ExperimentalCronetEngine.Builder mCronetEngineBuilder =
@@ -1414,10 +1371,8 @@ public class CronetUrlRequestContextTest extends CronetTestBase {
builder.addQuicHint("example.com", 12, 34);
builder.setCertVerifierData("test_cert_verifier_data");
builder.enableHttpCache(HTTP_CACHE_IN_MEMORY, 54321);
- builder.enableDataReductionProxy("abcd");
builder.setUserAgent("efgh");
builder.setExperimentalOptions("ijkl");
- builder.setDataReductionProxyOptions("mnop", "qrst", "uvwx");
builder.setStoragePath(CronetTestFramework.getTestStorage(getContext()));
builder.enablePublicKeyPinningBypassForLocalTrustAnchors(false);
nativeVerifyUrlRequestContextConfig(

Powered by Google App Engine
This is Rietveld 408576698