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

Unified Diff: android_webview/embeddedtestserver/test/android/aw_test_jni_onload.cc

Issue 2687573002: [Android Webview] Refactor LoadUrlTest and work on embedded_test_server custom handler (Closed)
Patch Set: discussing patch Created 3 years, 10 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: android_webview/embeddedtestserver/test/android/aw_test_jni_onload.cc
diff --git a/android_webview/embeddedtestserver/test/android/aw_test_jni_onload.cc b/android_webview/embeddedtestserver/test/android/aw_test_jni_onload.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2f1e65c445c0d885956d5a3c65e20e3bd9bb9d14
--- /dev/null
+++ b/android_webview/embeddedtestserver/test/android/aw_test_jni_onload.cc
@@ -0,0 +1,35 @@
+// Copyright 2017 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.
+
+#include "android_webview/embeddedtestserver/test/android/aw_test_jni_onload.h"
+
+#include "android_webview/embeddedtestserver/aw_embedded_test_server_android.h"
+#include "base/android/base_jni_onload.h"
+#include "base/android/base_jni_registrar.h"
+#include "base/android/jni_android.h"
+#include "base/bind.h"
+
+namespace net {
+namespace test {
+
+namespace {
+
+bool RegisterJNI(JNIEnv* env) {
+ return net::test_server::AwEmbeddedTestServerAndroid::
+ RegisterAwEmbeddedTestServerAndroid(env);
+}
+
+} // namesapce
+
+bool OnJNIOnLoadRegisterJNI(JNIEnv* env) {
+ return base::android::OnJNIOnLoadRegisterJNI(env) &&
+ base::android::RegisterJni(env) && RegisterJNI(env);
+}
+
+bool OnJNIOnLoadInit() {
+ return base::android::OnJNIOnLoadInit();
+}
+
+} // namespace test
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698