Revert "Cronet: add test server"

This reverts commit a0f25c4ed06b84a65b826f78ecf0516b6e530199.

Reason for revert: breaking in postsubmit. See b/262291156

Change-Id: I1ba3bcc5e25b384b18112371e4835ba25c40ad44
diff --git a/Cronet/tests/cts/Android.bp b/Cronet/tests/cts/Android.bp
index f6d1e03..e71c707 100644
--- a/Cronet/tests/cts/Android.bp
+++ b/Cronet/tests/cts/Android.bp
@@ -20,14 +20,10 @@
 
 java_library {
     name: "CronetApiCommonTests",
-    srcs: [
-        "src/**/*.java",
-        "src/**/*.kt"
-    ],
+    srcs: ["src/**/*.java"],
     static_libs: [
         "androidx.test.rules",
         "androidx.core_core",
-        "ctstestserver",
         "junit",
     ],
     libs: [
@@ -36,7 +32,6 @@
         "android.test.mock",
         "androidx.annotation_annotation",
         "framework-cronet",
-        "org.apache.http.legacy",
     ],
 }
 
diff --git a/Cronet/tests/cts/AndroidManifest.xml b/Cronet/tests/cts/AndroidManifest.xml
index 5bbd597..db0f0b3 100644
--- a/Cronet/tests/cts/AndroidManifest.xml
+++ b/Cronet/tests/cts/AndroidManifest.xml
@@ -18,18 +18,18 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="org.chromium.net.test">
+        package="org.chromium.net.test">
 
     <uses-permission android:name="android.permission.INTERNET"/>
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 
-    <application android:networkSecurityConfig="@xml/network_security_config">
-        <uses-library android:name="android.test.runner"/>
-        <uses-library android:name="framework-cronet"/>
+    <application>
+        <uses-library android:name="android.test.runner" />
+        <uses-library android:name="framework-cronet" />
     </application>
 
     <instrumentation
         android:name="androidx.test.runner.AndroidJUnitRunner"
         android:targetPackage="org.chromium.net.test"
-        android:label="Cronet API Networking Tests"/>
-</manifest>
+        android:label="Cronet API Networking Tests" />
+</manifest>
\ No newline at end of file
diff --git a/Cronet/tests/cts/assets/html/hello_world.html b/Cronet/tests/cts/assets/html/hello_world.html
deleted file mode 100644
index ea62ce2..0000000
--- a/Cronet/tests/cts/assets/html/hello_world.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  ~ Copyright (C) 2022 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<head>
-    <title>hello world</title>
-</head>
-<body>
-<h3>hello world</h3><br>
-</body>
-</html>
\ No newline at end of file
diff --git a/Cronet/tests/cts/res/xml/network_security_config.xml b/Cronet/tests/cts/res/xml/network_security_config.xml
deleted file mode 100644
index 7d7530b..0000000
--- a/Cronet/tests/cts/res/xml/network_security_config.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  ~ Copyright (C) 2022 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<network-security-config>
-    <domain-config cleartextTrafficPermitted="true">
-        <domain includeSubdomains="true">localhost</domain>
-    </domain-config>
-</network-security-config>
\ No newline at end of file
diff --git a/Cronet/tests/cts/src/org/chromium/net/test/CronetUrlRequestTest.java b/Cronet/tests/cts/src/org/chromium/net/test/CronetUrlRequestTest.java
index 59f95cd..7dd9a9a 100644
--- a/Cronet/tests/cts/src/org/chromium/net/test/CronetUrlRequestTest.java
+++ b/Cronet/tests/cts/src/org/chromium/net/test/CronetUrlRequestTest.java
@@ -29,7 +29,6 @@
 import org.chromium.net.CronetEngine;
 import org.chromium.net.UrlRequest;
 import org.chromium.net.UrlResponseInfo;
-import org.chromium.net.test.util.CronetCtsTestServer;
 import org.chromium.net.test.util.TestUrlRequestCallback;
 import org.chromium.net.test.util.TestUrlRequestCallback.ResponseStep;
 import org.junit.Before;
@@ -46,7 +45,6 @@
     private final String[] mTestDomains = {"www.google.com", "www.android.com"};
     @NonNull private CronetEngine mCronetEngine;
     @NonNull private ConnectivityManager mCm;
-    @NonNull private CronetCtsTestServer mTestServer;
 
     @Before
     public void setUp() throws Exception {
@@ -58,7 +56,6 @@
                 // .enableBrotli(true)
                 .enableQuic(true);
         mCronetEngine = builder.build();
-        mTestServer = new CronetCtsTestServer(context);
     }
 
     private static void assertGreaterThan(String msg, int first, int second) {
@@ -77,7 +74,7 @@
     @Test
     public void testUrlRequestGet_CompletesSuccessfully() throws Exception {
         assertHasTestableNetworks();
-        String url = mTestServer.getSuccessUrl();
+        String url = HTTPS_PREFIX + getRandomDomain();
         TestUrlRequestCallback callback = new TestUrlRequestCallback();
         UrlRequest.Builder builder = mCronetEngine.newUrlRequestBuilder(url, callback,
                 callback.getExecutor());
diff --git a/Cronet/tests/cts/src/org/chromium/net/test/util/CronetCtsTestServer.kt b/Cronet/tests/cts/src/org/chromium/net/test/util/CronetCtsTestServer.kt
deleted file mode 100644
index cc9ad5c..0000000
--- a/Cronet/tests/cts/src/org/chromium/net/test/util/CronetCtsTestServer.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.chromium.net.test.util
-
-import android.content.Context
-import android.webkit.cts.CtsTestServer
-
-/** Extends CtsTestServer to handle POST requests and other cronet specific test requests */
-class CronetCtsTestServer(context: Context) : CtsTestServer(context) {
-
-    val successUrl: String = getAssetUrl("html/hello_world.html")
-}