| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_test_util_common.h" | 5 #include "net/spdy/spdy_test_util_common.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 } | 802 } |
| 803 | 803 |
| 804 SpdyFrame* SpdyTestUtil::ConstructSpdyControlFrame( | 804 SpdyFrame* SpdyTestUtil::ConstructSpdyControlFrame( |
| 805 scoped_ptr<SpdyHeaderBlock> headers, | 805 scoped_ptr<SpdyHeaderBlock> headers, |
| 806 bool compressed, | 806 bool compressed, |
| 807 SpdyStreamId stream_id, | 807 SpdyStreamId stream_id, |
| 808 RequestPriority request_priority, | 808 RequestPriority request_priority, |
| 809 SpdyFrameType type, | 809 SpdyFrameType type, |
| 810 SpdyControlFlags flags, | 810 SpdyControlFlags flags, |
| 811 SpdyStreamId associated_stream_id) const { | 811 SpdyStreamId associated_stream_id) const { |
| 812 EXPECT_GE(type, FIRST_CONTROL_TYPE); | 812 EXPECT_GE(type, DATA); |
| 813 EXPECT_LE(type, LAST_CONTROL_TYPE); | 813 EXPECT_LE(type, PRIORITY); |
| 814 const SpdyHeaderInfo header_info = { | 814 const SpdyHeaderInfo header_info = { |
| 815 type, | 815 type, |
| 816 stream_id, | 816 stream_id, |
| 817 associated_stream_id, | 817 associated_stream_id, |
| 818 ConvertRequestPriorityToSpdyPriority(request_priority, spdy_version_), | 818 ConvertRequestPriorityToSpdyPriority(request_priority, spdy_version_), |
| 819 0, // credential slot | 819 0, // credential slot |
| 820 flags, | 820 flags, |
| 821 compressed, | 821 compressed, |
| 822 RST_STREAM_INVALID, // status | 822 RST_STREAM_INVALID, // status |
| 823 NULL, // data | 823 NULL, // data |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 } | 1324 } |
| 1325 } | 1325 } |
| 1326 | 1326 |
| 1327 void SpdyTestUtil::SetPriority(RequestPriority priority, | 1327 void SpdyTestUtil::SetPriority(RequestPriority priority, |
| 1328 SpdySynStreamIR* ir) const { | 1328 SpdySynStreamIR* ir) const { |
| 1329 ir->set_priority(ConvertRequestPriorityToSpdyPriority( | 1329 ir->set_priority(ConvertRequestPriorityToSpdyPriority( |
| 1330 priority, spdy_version())); | 1330 priority, spdy_version())); |
| 1331 } | 1331 } |
| 1332 | 1332 |
| 1333 } // namespace net | 1333 } // namespace net |
| OLD | NEW |