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

Unified Diff: components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumJavaOnlyTestSupport.java

Issue 2561803002: Cronet smoke tests (Closed)
Patch Set: Got rid of //base/android/proguard/chromium_apk.flags proguard config. Created 4 years 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/smoketests/src/org/chromium/net/smoke/ChromiumJavaOnlyTestSupport.java
diff --git a/components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumJavaOnlyTestSupport.java b/components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumJavaOnlyTestSupport.java
new file mode 100644
index 0000000000000000000000000000000000000000..f512c9b1be36921367555c1ee587f25a871d01e4
--- /dev/null
+++ b/components/cronet/android/test/smoketests/src/org/chromium/net/smoke/ChromiumJavaOnlyTestSupport.java
@@ -0,0 +1,53 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.net.smoke;
+
+import android.content.Context;
+
+import org.json.JSONObject;
+
+import org.chromium.net.ExperimentalCronetEngine;
+
+import java.io.File;
+
+/**
+ * Tests support for Java only Cronet engine tests. This class should not depend on
+ * Chromium 'base' or 'net'.
+ */
+public class ChromiumJavaOnlyTestSupport implements TestSupport {
+ @Override
+ public TestServer createTestServer(Context context, Protocol protocol) {
+ switch (protocol) {
+ case QUIC:
+ throw new IllegalArgumentException("QUIC is not supported");
+ case HTTP2:
+ throw new IllegalArgumentException("HTTP2 is not supported");
+ case HTTP1:
+ return new HttpTestServer();
+ default:
+ throw new IllegalArgumentException("Unknown server protocol: " + protocol);
+ }
+ }
+
+ @Override
+ public void processNetLog(Context context, File file) {
+ // Do nothing
+ }
+
+ @Override
+ public void addHostResolverRules(JSONObject json) {
+ throw new UnsupportedOperationException("Unsupported by ChromiumJavaOnlyTestSupport");
+ }
+
+ @Override
+ public void installMockCertVerifierForTesting(ExperimentalCronetEngine.Builder builder) {
+ throw new UnsupportedOperationException("Unsupported by ChromiumJavaOnlyTestSupport");
+ }
+
+ @Override
+ public void loadTestNativeLibrary() {
+ throw new UnsupportedOperationException("Unsupported by ChromiumJavaOnlyTestSupport");
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698