| 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/spdy/spdy_websocket_stream.h" | 5 #include "net/spdy/spdy_websocket_stream.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 static const char kMessageFrame[]; | 281 static const char kMessageFrame[]; |
| 282 static const char kClosingFrame[]; | 282 static const char kClosingFrame[]; |
| 283 static const size_t kMessageFrameLength; | 283 static const size_t kMessageFrameLength; |
| 284 static const size_t kClosingFrameLength; | 284 static const size_t kClosingFrameLength; |
| 285 }; | 285 }; |
| 286 | 286 |
| 287 INSTANTIATE_TEST_CASE_P( | 287 INSTANTIATE_TEST_CASE_P( |
| 288 NextProto, | 288 NextProto, |
| 289 SpdyWebSocketStreamTest, | 289 SpdyWebSocketStreamTest, |
| 290 testing::Values(kProtoSPDY2, kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, | 290 testing::Values(kProtoDeprecatedSPDY2, |
| 291 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, |
| 291 kProtoHTTP2Draft04)); | 292 kProtoHTTP2Draft04)); |
| 292 | 293 |
| 293 // TODO(toyoshim): Replace old framing data to new one, then use HEADERS and | 294 // TODO(toyoshim): Replace old framing data to new one, then use HEADERS and |
| 294 // data frames. | 295 // data frames. |
| 295 const char SpdyWebSocketStreamTest::kMessageFrame[] = "\x81\x05hello"; | 296 const char SpdyWebSocketStreamTest::kMessageFrame[] = "\x81\x05hello"; |
| 296 const char SpdyWebSocketStreamTest::kClosingFrame[] = "\x88\0"; | 297 const char SpdyWebSocketStreamTest::kClosingFrame[] = "\x88\0"; |
| 297 const size_t SpdyWebSocketStreamTest::kMessageFrameLength = | 298 const size_t SpdyWebSocketStreamTest::kMessageFrameLength = |
| 298 arraysize(SpdyWebSocketStreamTest::kMessageFrame) - 1; | 299 arraysize(SpdyWebSocketStreamTest::kMessageFrame) - 1; |
| 299 const size_t SpdyWebSocketStreamTest::kClosingFrameLength = | 300 const size_t SpdyWebSocketStreamTest::kClosingFrameLength = |
| 300 arraysize(SpdyWebSocketStreamTest::kClosingFrame) - 1; | 301 arraysize(SpdyWebSocketStreamTest::kClosingFrame) - 1; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 EXPECT_EQ(OK, events[7].result); | 598 EXPECT_EQ(OK, events[7].result); |
| 598 | 599 |
| 599 // EOF close SPDY session. | 600 // EOF close SPDY session. |
| 600 EXPECT_FALSE( | 601 EXPECT_FALSE( |
| 601 HasSpdySession(http_session_->spdy_session_pool(), spdy_session_key_)); | 602 HasSpdySession(http_session_->spdy_session_pool(), spdy_session_key_)); |
| 602 EXPECT_TRUE(data.at_read_eof()); | 603 EXPECT_TRUE(data.at_read_eof()); |
| 603 EXPECT_TRUE(data.at_write_eof()); | 604 EXPECT_TRUE(data.at_write_eof()); |
| 604 } | 605 } |
| 605 | 606 |
| 606 } // namespace net | 607 } // namespace net |
| OLD | NEW |