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

Side by Side Diff: android_webview/embeddedtestserver/java/src/org/chromium/net/test/AwEmbeddedTestServerImpl.java

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.
jbudorick 2017/03/09 02:00:47 nit: This shouldn't be android_webview/embeddedtes
shenghuazhang 2017/03/13 18:48:15 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.net.test;
6
7 import android.content.Context;
8
9 import java.util.concurrent.Callable;
10
11 /**
12 * Java bindings for running a net::test_server::EmbeddedTestServer.
13 *
14 * This should not be used directly. Use {@link EmbeddedTestServer} instead.
15 */
16 public class AwEmbeddedTestServerImpl extends EmbeddedTestServerImpl {
17 /** Create an uninitialized EmbeddedTestServer. */
18 public AwEmbeddedTestServerImpl(Context context) {
jbudorick 2017/03/09 02:00:47 I think this can be omitted.
shenghuazhang 2017/03/13 18:48:15 Hmm...Actually it would reveal constructor error w
19 super(context);
20 }
21 /** Add the default handlers and serve files from the provided directory rel ative to the
22 * external storage directory.
23 *
24 * @param directoryPath The path of the directory from which files should b e served, relative
25 * to the external storage directory.
26 */
27 @Override
28 public void addDefaultHandlers(final String directoryPath) {
29 runOnHandlerThread(new Callable<Void>() {
30 @Override
31 public Void call() {
32 nativeAddDefaultHandlers(mNativeEmbeddedTestServer, directoryPat h);
33 CustomHandlers custom_handlers = new CustomHandlers();
34 long[] handlers = custom_handlers.getHandlers();
35 for (long h : handlers) {
36 nativeRegisterRequestHandler(mNativeEmbeddedTestServer, h);
37 }
38 return null;
39 }
40 });
41 }
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698