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

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

Issue 1039693003: [Cronet] Add support to run quic_simple_server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused header Created 5 years, 9 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/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();
+}

Powered by Google App Engine
This is Rietveld 408576698