| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <utility> | 5 #include <utility> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 TestTransactionConsumer consumer(DEFAULT_PRIORITY, | 252 TestTransactionConsumer consumer(DEFAULT_PRIORITY, |
| 253 transaction_factory_.get()); | 253 transaction_factory_.get()); |
| 254 consumer.Start(&request_, BoundNetLog()); | 254 consumer.Start(&request_, BoundNetLog()); |
| 255 | 255 |
| 256 // Will terminate when the last consumer completes. | 256 // Will terminate when the last consumer completes. |
| 257 base::MessageLoop::current()->Run(); | 257 base::MessageLoop::current()->Run(); |
| 258 | 258 |
| 259 CheckResponse(consumer, "HTTP/1.1 200", response); | 259 CheckResponse(consumer, "HTTP/1.1 200", response); |
| 260 } | 260 } |
| 261 | 261 |
| 262 TEST_F(QuicEndToEndTest, LargePostWithNoPacketLoss) { | 262 // crbug.com/559173 |
| 263 #if defined(THREAD_SANITIZER) |
| 264 #define MAYBE_LargePostWithNoPacketLoss DISABLED_LargePostWithNoPacketLoss |
| 265 #else |
| 266 #define MAYBE_LargePostWithNoPacketLoss LargePostWithNoPacketLoss |
| 267 #endif |
| 268 TEST_F(QuicEndToEndTest, MAYBE_LargePostWithNoPacketLoss) { |
| 263 InitializePostRequest(1024 * 1024); | 269 InitializePostRequest(1024 * 1024); |
| 264 | 270 |
| 265 AddToCache(request_.url.PathForRequest(), 200, "OK", kResponseBody); | 271 AddToCache(request_.url.PathForRequest(), 200, "OK", kResponseBody); |
| 266 | 272 |
| 267 TestTransactionConsumer consumer(DEFAULT_PRIORITY, | 273 TestTransactionConsumer consumer(DEFAULT_PRIORITY, |
| 268 transaction_factory_.get()); | 274 transaction_factory_.get()); |
| 269 consumer.Start(&request_, BoundNetLog()); | 275 consumer.Start(&request_, BoundNetLog()); |
| 270 | 276 |
| 271 // Will terminate when the last consumer completes. | 277 // Will terminate when the last consumer completes. |
| 272 base::MessageLoop::current()->Run(); | 278 base::MessageLoop::current()->Run(); |
| 273 | 279 |
| 274 CheckResponse(consumer, "HTTP/1.1 200", kResponseBody); | 280 CheckResponse(consumer, "HTTP/1.1 200", kResponseBody); |
| 275 } | 281 } |
| 276 | 282 |
| 277 TEST_F(QuicEndToEndTest, LargePostWithPacketLoss) { | 283 // crbug.com/559173 |
| 284 #if defined(THREAD_SANITIZER) |
| 285 #define MAYBE_LargePostWithPacketLoss DISABLED_LargePostWithPacketLoss |
| 286 #else |
| 287 #define MAYBE_LargePostWithPacketLoss LargePostWithPacketLoss |
| 288 #endif |
| 289 TEST_F(QuicEndToEndTest, MAYBE_LargePostWithPacketLoss) { |
| 278 // FLAGS_fake_packet_loss_percentage = 30; | 290 // FLAGS_fake_packet_loss_percentage = 30; |
| 279 InitializePostRequest(1024 * 1024); | 291 InitializePostRequest(1024 * 1024); |
| 280 | 292 |
| 281 const char kResponseBody[] = "some really big response body"; | 293 const char kResponseBody[] = "some really big response body"; |
| 282 AddToCache(request_.url.PathForRequest(), 200, "OK", kResponseBody); | 294 AddToCache(request_.url.PathForRequest(), 200, "OK", kResponseBody); |
| 283 | 295 |
| 284 TestTransactionConsumer consumer(DEFAULT_PRIORITY, | 296 TestTransactionConsumer consumer(DEFAULT_PRIORITY, |
| 285 transaction_factory_.get()); | 297 transaction_factory_.get()); |
| 286 consumer.Start(&request_, BoundNetLog()); | 298 consumer.Start(&request_, BoundNetLog()); |
| 287 | 299 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 316 base::MessageLoop::current()->Run(); | 328 base::MessageLoop::current()->Run(); |
| 317 | 329 |
| 318 for (size_t i = 0; i < num_requests; ++i) { | 330 for (size_t i = 0; i < num_requests; ++i) { |
| 319 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody); | 331 CheckResponse(*consumers[i], "HTTP/1.1 200", kResponseBody); |
| 320 } | 332 } |
| 321 STLDeleteElements(&consumers); | 333 STLDeleteElements(&consumers); |
| 322 } | 334 } |
| 323 | 335 |
| 324 } // namespace test | 336 } // namespace test |
| 325 } // namespace net | 337 } // namespace net |
| OLD | NEW |