| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "net/spdy/spdy_deframer_visitor.h" | 5 #include "net/spdy/spdy_deframer_visitor.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 using ::base::MakeUnique; | 25 using ::base::MakeUnique; |
| 26 using ::std::string; | 26 using ::std::string; |
| 27 | 27 |
| 28 namespace net { | 28 namespace net { |
| 29 namespace test { | 29 namespace test { |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 class SpdyDeframerVisitorTest : public ::testing::Test { | 32 class SpdyDeframerVisitorTest : public ::testing::Test { |
| 33 protected: | 33 protected: |
| 34 SpdyDeframerVisitorTest() : encoder_(HTTP2), decoder_(HTTP2) { | 34 SpdyDeframerVisitorTest() { |
| 35 decoder_.set_process_single_input_frame(true); | 35 decoder_.set_process_single_input_frame(true); |
| 36 auto collector = MakeUnique<DeframerCallbackCollector>(&collected_frames_); | 36 auto collector = MakeUnique<DeframerCallbackCollector>(&collected_frames_); |
| 37 auto log_and_collect = | 37 auto log_and_collect = |
| 38 SpdyDeframerVisitorInterface::LogBeforeVisiting(std::move(collector)); | 38 SpdyDeframerVisitorInterface::LogBeforeVisiting(std::move(collector)); |
| 39 deframer_ = SpdyTestDeframer::CreateConverter(std::move(log_and_collect)); | 39 deframer_ = SpdyTestDeframer::CreateConverter(std::move(log_and_collect)); |
| 40 decoder_.set_visitor(deframer_.get()); | 40 decoder_.set_visitor(deframer_.get()); |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool DeframeInput(const char* input, size_t size) { | 43 bool DeframeInput(const char* input, size_t size) { |
| 44 size_t input_remaining = size; | 44 size_t input_remaining = size; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // TODO(jamessynge): Please implement. | 263 // TODO(jamessynge): Please implement. |
| 264 } | 264 } |
| 265 | 265 |
| 266 TEST_F(SpdyDeframerVisitorTest, DISABLED_AltSvcFrame) { | 266 TEST_F(SpdyDeframerVisitorTest, DISABLED_AltSvcFrame) { |
| 267 // TODO(jamessynge): Please implement. | 267 // TODO(jamessynge): Please implement. |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace | 270 } // namespace |
| 271 } // namespace test | 271 } // namespace test |
| 272 } // namespace net | 272 } // namespace net |
| OLD | NEW |