| 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 "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "net/base/completion_callback.h" | 6 #include "net/base/completion_callback.h" |
| 7 #include "net/base/net_log_unittest.h" | 7 #include "net/base/net_log_unittest.h" |
| 8 #include "net/spdy/buffered_spdy_framer.h" | 8 #include "net/spdy/buffered_spdy_framer.h" |
| 9 #include "net/spdy/spdy_stream.h" | 9 #include "net/spdy/spdy_stream.h" |
| 10 #include "net/spdy/spdy_http_utils.h" | 10 #include "net/spdy/spdy_http_utils.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 ConstructSpdyBodyFrame("\0hello!\xff", 8)); | 349 ConstructSpdyBodyFrame("\0hello!\xff", 8)); |
| 350 MockRead reads[] = { | 350 MockRead reads[] = { |
| 351 CreateMockRead(*resp), | 351 CreateMockRead(*resp), |
| 352 CreateMockRead(*echo), | 352 CreateMockRead(*echo), |
| 353 MockRead(ASYNC, 0, 0), // EOF | 353 MockRead(ASYNC, 0, 0), // EOF |
| 354 }; | 354 }; |
| 355 reads[0].sequence_number = 1; | 355 reads[0].sequence_number = 1; |
| 356 reads[1].sequence_number = 3; | 356 reads[1].sequence_number = 3; |
| 357 reads[2].sequence_number = 4; | 357 reads[2].sequence_number = 4; |
| 358 | 358 |
| 359 net::CapturingBoundNetLog log(net::CapturingNetLog::kUnbounded); | 359 CapturingBoundNetLog log; |
| 360 | 360 |
| 361 scoped_ptr<OrderedSocketData> data( | 361 scoped_ptr<OrderedSocketData> data( |
| 362 new OrderedSocketData(reads, arraysize(reads), | 362 new OrderedSocketData(reads, arraysize(reads), |
| 363 writes, arraysize(writes))); | 363 writes, arraysize(writes))); |
| 364 MockConnect connect_data(SYNCHRONOUS, OK); | 364 MockConnect connect_data(SYNCHRONOUS, OK); |
| 365 data->set_connect_data(connect_data); | 365 data->set_connect_data(connect_data); |
| 366 | 366 |
| 367 session_deps.socket_factory->AddSocketDataProvider(data.get()); | 367 session_deps.socket_factory->AddSocketDataProvider(data.get()); |
| 368 | 368 |
| 369 scoped_refptr<SpdySession> session(CreateSpdySession()); | 369 scoped_refptr<SpdySession> session(CreateSpdySession()); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 entries, 0, | 430 entries, 0, |
| 431 net::NetLog::TYPE_SPDY_STREAM_ERROR, | 431 net::NetLog::TYPE_SPDY_STREAM_ERROR, |
| 432 net::NetLog::PHASE_NONE); | 432 net::NetLog::PHASE_NONE); |
| 433 | 433 |
| 434 int stream_id2; | 434 int stream_id2; |
| 435 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2)); | 435 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2)); |
| 436 EXPECT_EQ(static_cast<int>(stream_id), stream_id2); | 436 EXPECT_EQ(static_cast<int>(stream_id), stream_id2); |
| 437 } | 437 } |
| 438 | 438 |
| 439 } // namespace net | 439 } // namespace net |
| OLD | NEW |