| 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/quic/quic_session.h" | 5 #include "net/quic/quic_session.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 SpdyHeaderBlock headers; | 732 SpdyHeaderBlock headers; |
| 733 while (!headers_stream->flow_controller()->IsBlocked() && stream_id < 2000) { | 733 while (!headers_stream->flow_controller()->IsBlocked() && stream_id < 2000) { |
| 734 EXPECT_FALSE(session_.IsConnectionFlowControlBlocked()); | 734 EXPECT_FALSE(session_.IsConnectionFlowControlBlocked()); |
| 735 EXPECT_FALSE(session_.IsStreamFlowControlBlocked()); | 735 EXPECT_FALSE(session_.IsStreamFlowControlBlocked()); |
| 736 headers["header"] = base::Uint64ToString(base::RandUint64()) + | 736 headers["header"] = base::Uint64ToString(base::RandUint64()) + |
| 737 base::Uint64ToString(base::RandUint64()) + | 737 base::Uint64ToString(base::RandUint64()) + |
| 738 base::Uint64ToString(base::RandUint64()); | 738 base::Uint64ToString(base::RandUint64()); |
| 739 headers_stream->WriteHeaders(stream_id, headers, true, nullptr); | 739 headers_stream->WriteHeaders(stream_id, headers, true, nullptr); |
| 740 stream_id += 2; | 740 stream_id += 2; |
| 741 } | 741 } |
| 742 // Write one more to ensure that the headers stream has buffered data. The | 742 // Write once more to ensure that the headers stream has buffered data. The |
| 743 // random headers may have exactly filled the flow control window. | 743 // random headers may have exactly filled the flow control window. |
| 744 headers_stream->WriteHeaders(stream_id, headers, true, nullptr); | 744 headers_stream->WriteHeaders(stream_id, headers, true, nullptr); |
| 745 EXPECT_TRUE(headers_stream->HasBufferedData()); | 745 EXPECT_TRUE(headers_stream->HasBufferedData()); |
| 746 | 746 |
| 747 EXPECT_TRUE(headers_stream->flow_controller()->IsBlocked()); | 747 EXPECT_TRUE(headers_stream->flow_controller()->IsBlocked()); |
| 748 EXPECT_FALSE(crypto_stream->flow_controller()->IsBlocked()); | 748 EXPECT_FALSE(crypto_stream->flow_controller()->IsBlocked()); |
| 749 EXPECT_FALSE(session_.IsConnectionFlowControlBlocked()); | 749 EXPECT_FALSE(session_.IsConnectionFlowControlBlocked()); |
| 750 EXPECT_TRUE(session_.IsStreamFlowControlBlocked()); | 750 EXPECT_TRUE(session_.IsStreamFlowControlBlocked()); |
| 751 EXPECT_FALSE(session_.HasDataToWrite()); | 751 EXPECT_FALSE(session_.HasDataToWrite()); |
| 752 | 752 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 // Called after any new data is received by the session, and triggers the call | 1023 // Called after any new data is received by the session, and triggers the call |
| 1024 // to close the connection. | 1024 // to close the connection. |
| 1025 session_.PostProcessAfterData(); | 1025 session_.PostProcessAfterData(); |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 } // namespace | 1028 } // namespace |
| 1029 } // namespace test | 1029 } // namespace test |
| 1030 } // namespace net | 1030 } // namespace net |
| OLD | NEW |