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

Side by Side Diff: android_webview/embeddedtestserver/aw_test_jni_onload.cc

Issue 2687573002: [Android Webview] Refactor LoadUrlTest and work on embedded_test_server custom handler (Closed)
Patch Set: ready Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "android_webview/embeddedtestserver/custom_handlers.h"
6 #include "base/android/base_jni_onload.h"
7 #include "base/android/base_jni_registrar.h"
8 #include "base/android/jni_android.h"
9 #include "base/bind.h"
10 #include "base/trace_event/trace_event.h"
11 #include "net/test/android/net_test_jni_onload.h"
12 #include "net/test/embedded_test_server/android/embedded_test_server_android.h"
13
14 namespace net {
jbudorick 2017/03/09 02:00:47 This should be android_webvew::test, not net::test
shenghuazhang 2017/03/13 18:48:15 Done.
15 namespace test {
16
17 namespace {
18
19 bool RegisterJNI(JNIEnv* env) {
20 return net::test_server::EmbeddedTestServerAndroid::
21 RegisterEmbeddedTestServerAndroid(env);
22 }
23
24 bool RegisterHandlersJNI(JNIEnv* env) {
25 TRACE_EVENT0("native", "net::test::RegisterHandlersJNI");
26 return net::test::RegisterCustomHandlers(env);
27 }
28
29 } // namesapce
30
31 bool OnJNIOnLoadRegisterJNI(JNIEnv* env) {
32 return base::android::OnJNIOnLoadRegisterJNI(env) &&
33 base::android::RegisterJni(env) && RegisterHandlersJNI(env) &&
34 RegisterJNI(env);
35 }
36
37 bool OnJNIOnLoadInit() {
38 return base::android::OnJNIOnLoadInit();
39 }
40
41 } // namespace test
42 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698