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

Side by Side Diff: net/http/http_network_transaction_spdy21_unittest.cc

Issue 9618002: SPDY - integration of spdy/3 code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/http_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 class HttpNetworkTransactionSpdy21Test : public PlatformTest { 158 class HttpNetworkTransactionSpdy21Test : public PlatformTest {
159 protected: 159 protected:
160 struct SimpleGetHelperResult { 160 struct SimpleGetHelperResult {
161 int rv; 161 int rv;
162 std::string status_line; 162 std::string status_line;
163 std::string response_data; 163 std::string response_data;
164 }; 164 };
165 165
166 virtual void SetUp() { 166 virtual void SetUp() {
167 SpdySession::set_default_protocol(SSLClientSocket::kProtoSPDY21);
167 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 168 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
168 MessageLoop::current()->RunAllPending(); 169 MessageLoop::current()->RunAllPending();
169 spdy::SpdyFramer::set_enable_compression_default(false); 170 spdy::SpdyFramer::set_enable_compression_default(false);
170 } 171 }
171 172
172 virtual void TearDown() { 173 virtual void TearDown() {
173 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 174 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
174 MessageLoop::current()->RunAllPending(); 175 MessageLoop::current()->RunAllPending();
175 spdy::SpdyFramer::set_enable_compression_default(true); 176 spdy::SpdyFramer::set_enable_compression_default(true);
176 // Empty the current queue. 177 // Empty the current queue.
(...skipping 9190 matching lines...) Expand 10 before | Expand all | Expand 10 after
9367 StaticSocketDataProvider* data[] = { &data1, &data2 }; 9368 StaticSocketDataProvider* data[] = { &data1, &data2 };
9368 9369
9369 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data)); 9370 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data));
9370 9371
9371 EXPECT_EQ(OK, out.rv); 9372 EXPECT_EQ(OK, out.rv);
9372 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line); 9373 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line);
9373 EXPECT_EQ("hello world", out.response_data); 9374 EXPECT_EQ("hello world", out.response_data);
9374 } 9375 }
9375 9376
9376 } // namespace net 9377 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_layer.cc ('k') | net/http/http_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698