| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |