| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/http/bidirectional_stream.h" | 5 #include "net/http/bidirectional_stream.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 289 |
| 290 private: | 290 private: |
| 291 DISALLOW_COPY_AND_ASSIGN(MockTimer); | 291 DISALLOW_COPY_AND_ASSIGN(MockTimer); |
| 292 }; | 292 }; |
| 293 | 293 |
| 294 } // namespace | 294 } // namespace |
| 295 | 295 |
| 296 class BidirectionalStreamTest : public testing::TestWithParam<bool> { | 296 class BidirectionalStreamTest : public testing::TestWithParam<bool> { |
| 297 public: | 297 public: |
| 298 BidirectionalStreamTest() | 298 BidirectionalStreamTest() |
| 299 : spdy_util_(kProtoHTTP2, false), | 299 : spdy_util_(kProtoHTTP2, true), |
| 300 session_deps_(kProtoHTTP2), | 300 session_deps_(kProtoHTTP2), |
| 301 ssl_data_(SSLSocketDataProvider(ASYNC, OK)) { | 301 ssl_data_(SSLSocketDataProvider(ASYNC, OK)) { |
| 302 ssl_data_.SetNextProto(kProtoHTTP2); | 302 ssl_data_.SetNextProto(kProtoHTTP2); |
| 303 ssl_data_.cert = ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); | 303 ssl_data_.cert = ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); |
| 304 } | 304 } |
| 305 | 305 |
| 306 protected: | 306 protected: |
| 307 void TearDown() override { | 307 void TearDown() override { |
| 308 if (sequenced_data_) { | 308 if (sequenced_data_) { |
| 309 EXPECT_TRUE(sequenced_data_->AllReadDataConsumed()); | 309 EXPECT_TRUE(sequenced_data_->AllReadDataConsumed()); |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 | 1189 |
| 1190 // If stream is destroyed, do not call into stream. | 1190 // If stream is destroyed, do not call into stream. |
| 1191 if (!GetParam()) | 1191 if (!GetParam()) |
| 1192 return; | 1192 return; |
| 1193 EXPECT_EQ(0, delegate->GetTotalSentBytes()); | 1193 EXPECT_EQ(0, delegate->GetTotalSentBytes()); |
| 1194 EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); | 1194 EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); |
| 1195 EXPECT_EQ(kProtoUnknown, delegate->GetProtocol()); | 1195 EXPECT_EQ(kProtoUnknown, delegate->GetProtocol()); |
| 1196 } | 1196 } |
| 1197 | 1197 |
| 1198 } // namespace net | 1198 } // namespace net |
| OLD | NEW |