Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: net/spdy/spdy_http_stream_unittest.cc

Issue 987123002: Advertise HTTP/2 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 scoped_refptr<HttpNetworkSession> http_session_; 123 scoped_refptr<HttpNetworkSession> http_session_;
124 base::WeakPtr<SpdySession> session_; 124 base::WeakPtr<SpdySession> session_;
125 125
126 private: 126 private:
127 MockECSignatureCreatorFactory ec_signature_creator_factory_; 127 MockECSignatureCreatorFactory ec_signature_creator_factory_;
128 }; 128 };
129 129
130 INSTANTIATE_TEST_CASE_P( 130 INSTANTIATE_TEST_CASE_P(
131 NextProto, 131 NextProto,
132 SpdyHttpStreamTest, 132 SpdyHttpStreamTest,
133 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15)); 133 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15, kProtoSPDY4));
134 134
135 // SpdyHttpStream::GetUploadProgress() should still work even before the 135 // SpdyHttpStream::GetUploadProgress() should still work even before the
136 // stream is initialized. 136 // stream is initialized.
137 TEST_P(SpdyHttpStreamTest, GetUploadProgressBeforeInitialization) { 137 TEST_P(SpdyHttpStreamTest, GetUploadProgressBeforeInitialization) {
138 MockRead reads[] = { 138 MockRead reads[] = {
139 MockRead(ASYNC, 0, 0) // EOF 139 MockRead(ASYNC, 0, 0) // EOF
140 }; 140 };
141 141
142 HostPortPair host_port_pair("www.google.com", 80); 142 HostPortPair host_port_pair("www.google.com", 80);
143 SpdySessionKey key(host_port_pair, ProxyServer::Direct(), 143 SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 ASSERT_TRUE(response.headers.get()); 784 ASSERT_TRUE(response.headers.get());
785 ASSERT_EQ(200, response.headers->response_code()); 785 ASSERT_EQ(200, response.headers->response_code());
786 EXPECT_TRUE(deterministic_data_->at_read_eof()); 786 EXPECT_TRUE(deterministic_data_->at_read_eof());
787 EXPECT_TRUE(deterministic_data_->at_write_eof()); 787 EXPECT_TRUE(deterministic_data_->at_write_eof());
788 } 788 }
789 789
790 // TODO(willchan): Write a longer test for SpdyStream that exercises all 790 // TODO(willchan): Write a longer test for SpdyStream that exercises all
791 // methods. 791 // methods.
792 792
793 } // namespace net 793 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer_unittest.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698