| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2341 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_); | 2341 EXPECT_EQ(0, session->session_unacked_recv_window_bytes_); |
| 2342 } | 2342 } |
| 2343 | 2343 |
| 2344 // Within this framework and with the "enable_spdy_4" flag, a | 2344 // Within this framework and with the "enable_spdy_4" flag, a |
| 2345 // SpdySession should be initialized with flow control enabled for | 2345 // SpdySession should be initialized with flow control enabled for |
| 2346 // streams and sessions and with protocol version 4. | 2346 // streams and sessions and with protocol version 4. |
| 2347 // | 2347 // |
| 2348 // NOTE(akalin): We are still figuring out the story for SPDY4 test | 2348 // NOTE(akalin): We are still figuring out the story for SPDY4 test |
| 2349 // coverage. | 2349 // coverage. |
| 2350 TEST_F(SpdySessionSpdy3Test, ProtocolNegotiation4) { | 2350 TEST_F(SpdySessionSpdy3Test, ProtocolNegotiation4) { |
| 2351 session_deps_.protocol = kProtoSPDY4a1; | 2351 session_deps_.protocol = kProtoSPDY4a2; |
| 2352 session_deps_.host_resolver->set_synchronous_mode(true); | 2352 session_deps_.host_resolver->set_synchronous_mode(true); |
| 2353 | 2353 |
| 2354 MockConnect connect_data(SYNCHRONOUS, OK); | 2354 MockConnect connect_data(SYNCHRONOUS, OK); |
| 2355 MockRead reads[] = { | 2355 MockRead reads[] = { |
| 2356 MockRead(SYNCHRONOUS, 0, 0) // EOF | 2356 MockRead(SYNCHRONOUS, 0, 0) // EOF |
| 2357 }; | 2357 }; |
| 2358 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); | 2358 StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0); |
| 2359 data.set_connect_data(connect_data); | 2359 data.set_connect_data(connect_data); |
| 2360 session_deps_.socket_factory->AddSocketDataProvider(&data); | 2360 session_deps_.socket_factory->AddSocketDataProvider(&data); |
| 2361 | 2361 |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3469 EXPECT_EQ(0, delegate1.body_data_sent()); | 3469 EXPECT_EQ(0, delegate1.body_data_sent()); |
| 3470 | 3470 |
| 3471 EXPECT_TRUE(delegate2.send_headers_completed()); | 3471 EXPECT_TRUE(delegate2.send_headers_completed()); |
| 3472 EXPECT_EQ("200", delegate2.GetResponseHeaderValue(":status")); | 3472 EXPECT_EQ("200", delegate2.GetResponseHeaderValue(":status")); |
| 3473 EXPECT_EQ("HTTP/1.1", delegate2.GetResponseHeaderValue(":version")); | 3473 EXPECT_EQ("HTTP/1.1", delegate2.GetResponseHeaderValue(":version")); |
| 3474 EXPECT_EQ(std::string(), delegate2.TakeReceivedData()); | 3474 EXPECT_EQ(std::string(), delegate2.TakeReceivedData()); |
| 3475 EXPECT_EQ(0, delegate2.body_data_sent()); | 3475 EXPECT_EQ(0, delegate2.body_data_sent()); |
| 3476 } | 3476 } |
| 3477 | 3477 |
| 3478 } // namespace net | 3478 } // namespace net |
| OLD | NEW |