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_http_stream.h" | 5 #include "net/spdy/spdy_http_stream.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } // namespace | 109 } // namespace |
110 | 110 |
111 class SpdyHttpStreamTest : public testing::Test, | 111 class SpdyHttpStreamTest : public testing::Test, |
112 public testing::WithParamInterface<TestCase> { | 112 public testing::WithParamInterface<TestCase> { |
113 public: | 113 public: |
114 SpdyHttpStreamTest() | 114 SpdyHttpStreamTest() |
115 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()), | 115 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()), |
116 session_deps_(GetProtocol()) { | 116 session_deps_(GetProtocol()) { |
117 session_deps_.enable_priority_dependencies = GetDependenciesFromPriority(); | 117 session_deps_.enable_priority_dependencies = GetDependenciesFromPriority(); |
118 session_deps_.net_log = &net_log_; | 118 session_deps_.net_log = &net_log_; |
| 119 spdy_util_.set_default_url(GURL("http://www.example.org/")); |
119 } | 120 } |
120 | 121 |
121 ~SpdyHttpStreamTest() {} | 122 ~SpdyHttpStreamTest() {} |
122 | 123 |
123 protected: | 124 protected: |
124 NextProto GetProtocol() const { | 125 NextProto GetProtocol() const { |
125 return GetParam() == kTestCaseSPDY31 ? kProtoSPDY31 : kProtoHTTP2; | 126 return GetParam() == kTestCaseSPDY31 ? kProtoSPDY31 : kProtoHTTP2; |
126 } | 127 } |
127 | 128 |
128 bool GetDependenciesFromPriority() const { | 129 bool GetDependenciesFromPriority() const { |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 | 1086 |
1086 // Because the server has closed the connection, there shouldn't be a session | 1087 // Because the server has closed the connection, there shouldn't be a session |
1087 // in the pool anymore. | 1088 // in the pool anymore. |
1088 EXPECT_FALSE(HasSpdySession(http_session_->spdy_session_pool(), key)); | 1089 EXPECT_FALSE(HasSpdySession(http_session_->spdy_session_pool(), key)); |
1089 } | 1090 } |
1090 | 1091 |
1091 // TODO(willchan): Write a longer test for SpdyStream that exercises all | 1092 // TODO(willchan): Write a longer test for SpdyStream that exercises all |
1092 // methods. | 1093 // methods. |
1093 | 1094 |
1094 } // namespace net | 1095 } // namespace net |
OLD | NEW |