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

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

Issue 9516009: SPDY - disable spdy/2.1 (flow control) by default (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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 struct SimpleGetHelperResult { 154 struct SimpleGetHelperResult {
155 int rv; 155 int rv;
156 std::string status_line; 156 std::string status_line;
157 std::string response_data; 157 std::string response_data;
158 }; 158 };
159 159
160 virtual void SetUp() { 160 virtual void SetUp() {
161 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 161 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
162 MessageLoop::current()->RunAllPending(); 162 MessageLoop::current()->RunAllPending();
163 spdy::SpdyFramer::set_enable_compression_default(false); 163 spdy::SpdyFramer::set_enable_compression_default(false);
164 HttpStreamFactory::set_supported_spdy_version(NPN_SPDY_21);
164 } 165 }
165 166
166 virtual void TearDown() { 167 virtual void TearDown() {
167 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 168 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
168 MessageLoop::current()->RunAllPending(); 169 MessageLoop::current()->RunAllPending();
169 spdy::SpdyFramer::set_enable_compression_default(true); 170 spdy::SpdyFramer::set_enable_compression_default(true);
170 // Empty the current queue. 171 // Empty the current queue.
171 MessageLoop::current()->RunAllPending(); 172 MessageLoop::current()->RunAllPending();
172 PlatformTest::TearDown(); 173 PlatformTest::TearDown();
173 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 174 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
(...skipping 9166 matching lines...) Expand 10 before | Expand all | Expand 10 after
9340 StaticSocketDataProvider* data[] = { &data1, &data2 }; 9341 StaticSocketDataProvider* data[] = { &data1, &data2 };
9341 9342
9342 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data)); 9343 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data));
9343 9344
9344 EXPECT_EQ(OK, out.rv); 9345 EXPECT_EQ(OK, out.rv);
9345 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line); 9346 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line);
9346 EXPECT_EQ("hello world", out.response_data); 9347 EXPECT_EQ("hello world", out.response_data);
9347 } 9348 }
9348 9349
9349 } // namespace net 9350 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698