| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/tools/flip_server/spdy_interface.h" | 5 #include "net/tools/flip_server/spdy_interface.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 size_t, | 59 size_t, |
| 60 bool)); | 60 bool)); |
| 61 MOCK_METHOD1(OnSettings, void(bool clear_persisted)); | 61 MOCK_METHOD1(OnSettings, void(bool clear_persisted)); |
| 62 MOCK_METHOD3(OnSetting, void(SpdySettingsIds, uint8, uint32)); | 62 MOCK_METHOD3(OnSetting, void(SpdySettingsIds, uint8, uint32)); |
| 63 MOCK_METHOD2(OnPing, void(SpdyPingId unique_id, bool is_ack)); | 63 MOCK_METHOD2(OnPing, void(SpdyPingId unique_id, bool is_ack)); |
| 64 MOCK_METHOD2(OnRstStream, void(SpdyStreamId, SpdyRstStreamStatus)); | 64 MOCK_METHOD2(OnRstStream, void(SpdyStreamId, SpdyRstStreamStatus)); |
| 65 MOCK_METHOD2(OnGoAway, void(SpdyStreamId, SpdyGoAwayStatus)); | 65 MOCK_METHOD2(OnGoAway, void(SpdyStreamId, SpdyGoAwayStatus)); |
| 66 MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId, uint32)); | 66 MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId, uint32)); |
| 67 MOCK_METHOD3(OnPushPromise, | 67 MOCK_METHOD3(OnPushPromise, |
| 68 void(SpdyStreamId, SpdyStreamId, const SpdyHeaderBlock&)); | 68 void(SpdyStreamId, SpdyStreamId, const SpdyHeaderBlock&)); |
| 69 MOCK_METHOD2(OnUnknownFrame, bool(SpdyStreamId stream_id, int frame_type)); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 class FakeSMConnection : public SMConnection { | 72 class FakeSMConnection : public SMConnection { |
| 72 public: | 73 public: |
| 73 FakeSMConnection(EpollServer* epoll_server, | 74 FakeSMConnection(EpollServer* epoll_server, |
| 74 SSLState* ssl_state, | 75 SSLState* ssl_state, |
| 75 MemoryCache* memory_cache, | 76 MemoryCache* memory_cache, |
| 76 FlipAcceptor* acceptor, | 77 FlipAcceptor* acceptor, |
| 77 std::string log_prefix) | 78 std::string log_prefix) |
| 78 : SMConnection(epoll_server, | 79 : SMConnection(epoll_server, |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 ASSERT_EQ(2, spdy_framer_->frames_received()); | 878 ASSERT_EQ(2, spdy_framer_->frames_received()); |
| 878 ASSERT_EQ(2u, actual_header_block.size()); | 879 ASSERT_EQ(2u, actual_header_block.size()); |
| 879 ASSERT_EQ("404 Not Found", actual_header_block["status"]); | 880 ASSERT_EQ("404 Not Found", actual_header_block["status"]); |
| 880 ASSERT_EQ("HTTP/1.1", actual_header_block["version"]); | 881 ASSERT_EQ("HTTP/1.1", actual_header_block["version"]); |
| 881 ASSERT_EQ("wtf?", StringPiece(actual_data, actual_size)); | 882 ASSERT_EQ("wtf?", StringPiece(actual_data, actual_size)); |
| 882 } | 883 } |
| 883 | 884 |
| 884 } // namespace | 885 } // namespace |
| 885 | 886 |
| 886 } // namespace net | 887 } // namespace net |
| OLD | NEW |