| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import org.chromium.base.Log; | 7 import org.chromium.base.Log; |
| 8 | 8 |
| 9 import java.util.HashMap; | 9 import java.util.HashMap; |
| 10 import java.util.Locale; | 10 import java.util.Locale; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 * HTTP/2 test handler for Cronet BidirectionalStream tests. | 35 * HTTP/2 test handler for Cronet BidirectionalStream tests. |
| 36 */ | 36 */ |
| 37 public final class Http2TestHandler extends Http2ConnectionHandler implements Ht
tp2FrameListener { | 37 public final class Http2TestHandler extends Http2ConnectionHandler implements Ht
tp2FrameListener { |
| 38 // Some Url Paths that have special meaning. | 38 // Some Url Paths that have special meaning. |
| 39 public static final String ECHO_ALL_HEADERS_PATH = "/echoallheaders"; | 39 public static final String ECHO_ALL_HEADERS_PATH = "/echoallheaders"; |
| 40 public static final String ECHO_HEADER_PATH = "/echoheader"; | 40 public static final String ECHO_HEADER_PATH = "/echoheader"; |
| 41 public static final String ECHO_METHOD_PATH = "/echomethod"; | 41 public static final String ECHO_METHOD_PATH = "/echomethod"; |
| 42 public static final String ECHO_STREAM_PATH = "/echostream"; | 42 public static final String ECHO_STREAM_PATH = "/echostream"; |
| 43 public static final String ECHO_TRAILERS_PATH = "/echotrailers"; | 43 public static final String ECHO_TRAILERS_PATH = "/echotrailers"; |
| 44 | 44 |
| 45 private static final String TAG = "cr_Http2TestHandler"; | 45 private static final String TAG = Http2TestHandler.class.getSimpleName(); |
| 46 private static final Http2FrameLogger sLogger = | 46 private static final Http2FrameLogger sLogger = |
| 47 new Http2FrameLogger(INFO, Http2TestHandler.class); | 47 new Http2FrameLogger(INFO, Http2TestHandler.class); |
| 48 private static final ByteBuf RESPONSE_BYTES = | 48 private static final ByteBuf RESPONSE_BYTES = |
| 49 unreleasableBuffer(copiedBuffer("HTTP/2 Test Server", CharsetUtil.UT
F_8)); | 49 unreleasableBuffer(copiedBuffer("HTTP/2 Test Server", CharsetUtil.UT
F_8)); |
| 50 | 50 |
| 51 private HashMap<Integer, RequestResponder> mResponderMap = new HashMap<>(); | 51 private HashMap<Integer, RequestResponder> mResponderMap = new HashMap<>(); |
| 52 | 52 |
| 53 /** | 53 /** |
| 54 * Builder for HTTP/2 test handler. | 54 * Builder for HTTP/2 test handler. |
| 55 */ | 55 */ |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 ByteBuf debugData) throws Http2Exception {} | 278 ByteBuf debugData) throws Http2Exception {} |
| 279 | 279 |
| 280 @Override | 280 @Override |
| 281 public void onWindowUpdateRead(ChannelHandlerContext ctx, int streamId, int
windowSizeIncrement) | 281 public void onWindowUpdateRead(ChannelHandlerContext ctx, int streamId, int
windowSizeIncrement) |
| 282 throws Http2Exception {} | 282 throws Http2Exception {} |
| 283 | 283 |
| 284 @Override | 284 @Override |
| 285 public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int st
reamId, | 285 public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int st
reamId, |
| 286 Http2Flags flags, ByteBuf payload) throws Http2Exception {} | 286 Http2Flags flags, ByteBuf payload) throws Http2Exception {} |
| 287 } | 287 } |
| OLD | NEW |