Chromium Code Reviews| Index: components/cronet/android/test/src/org/chromium/net/QuicTestServer.java |
| diff --git a/components/cronet/android/test/src/org/chromium/net/QuicTestServer.java b/components/cronet/android/test/src/org/chromium/net/QuicTestServer.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6df6e890a0f39f2a71e842b905771e3822d07ce9 |
| --- /dev/null |
| +++ b/components/cronet/android/test/src/org/chromium/net/QuicTestServer.java |
| @@ -0,0 +1,28 @@ |
| +// Copyright 2015 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; |
| + |
| +import android.content.Context; |
| + |
| +import org.chromium.base.JNINamespace; |
| + |
| +/** |
| + * Wrapper class to start a Quic test server. |
| + */ |
| +@JNINamespace("cronet") |
| +public final class QuicTestServer { |
| + public static String SERVER_URL = "http://127.0.0.1:6121"; |
|
mef
2015/03/31 17:33:18
maybe make a getServerURL() method, similar to Nat
xunjieli
2015/03/31 17:50:15
Done.
|
| + |
| + public static void startQuicTestServer(Context context) { |
| + nativeStartQuicTestServer(TestFilesInstaller.getInstalledPath(context)); |
| + } |
| + |
| + public static void shutdownQuicTestServer() { |
| + nativeShutdownQuicTestServer(); |
| + } |
| + |
| + private static native void nativeStartQuicTestServer(String filePath); |
| + private static native void nativeShutdownQuicTestServer(); |
| +} |