| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 auth_handler_factory_( | 114 auth_handler_factory_( |
| 115 HttpAuthHandlerFactory::CreateDefault(&host_resolver_)), | 115 HttpAuthHandlerFactory::CreateDefault(&host_resolver_)), |
| 116 random_generator_(0), | 116 random_generator_(0), |
| 117 hanging_data_(nullptr, 0, nullptr, 0) { | 117 hanging_data_(nullptr, 0, nullptr, 0) { |
| 118 request_.method = "GET"; | 118 request_.method = "GET"; |
| 119 request_.url = GURL("http://www.google.com/"); | 119 request_.url = GURL("http://www.google.com/"); |
| 120 request_.load_flags = 0; | 120 request_.load_flags = 0; |
| 121 clock_->AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); | 121 clock_->AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); |
| 122 } | 122 } |
| 123 | 123 |
| 124 virtual void SetUp() { | 124 void SetUp() override { |
| 125 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); | 125 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); |
| 126 base::MessageLoop::current()->RunUntilIdle(); | 126 base::MessageLoop::current()->RunUntilIdle(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 virtual void TearDown() { | 129 void TearDown() override { |
| 130 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); | 130 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); |
| 131 // Empty the current queue. | 131 // Empty the current queue. |
| 132 base::MessageLoop::current()->RunUntilIdle(); | 132 base::MessageLoop::current()->RunUntilIdle(); |
| 133 PlatformTest::TearDown(); | 133 PlatformTest::TearDown(); |
| 134 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); | 134 NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); |
| 135 base::MessageLoop::current()->RunUntilIdle(); | 135 base::MessageLoop::current()->RunUntilIdle(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 scoped_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket( | 138 scoped_ptr<QuicEncryptedPacket> ConstructConnectionClosePacket( |
| 139 QuicPacketSequenceNumber num) { | 139 QuicPacketSequenceNumber num) { |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 nullptr, | 1032 nullptr, |
| 1033 net_log_.bound()); | 1033 net_log_.bound()); |
| 1034 | 1034 |
| 1035 CreateSessionWithNextProtos(); | 1035 CreateSessionWithNextProtos(); |
| 1036 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); | 1036 AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT); |
| 1037 SendRequestAndExpectHttpResponse("hello world"); | 1037 SendRequestAndExpectHttpResponse("hello world"); |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 } // namespace test | 1040 } // namespace test |
| 1041 } // namespace net | 1041 } // namespace net |
| OLD | NEW |