| 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..5f86ada006d5427b13a1d8dd736b1b4c5221a96d
|
| --- /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 H2:
|
| + throw new IllegalArgumentException("H2 is not supported");
|
| + case H1:
|
| + return new HttpTestServer();
|
| + default:
|
| + throw new IllegalArgumentException("Unknown server protocol: " + protocol);
|
| + }
|
| + }
|
| +
|
| + @Override
|
| + public void processNetLog(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");
|
| + }
|
| +}
|
|
|