OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "net/base/load_log.h" | 8 #include "net/base/load_log.h" |
9 #include "net/base/load_log_unittest.h" | 9 #include "net/base/load_log_unittest.h" |
10 #include "net/base/mock_host_resolver.h" | 10 #include "net/base/mock_host_resolver.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents(); | 204 const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents(); |
205 EXPECT_EQ(3U, events.size()); | 205 EXPECT_EQ(3U, events.size()); |
206 | 206 |
207 EXPECT_EQ(SocketStreamEvent::EVENT_AUTH_REQUIRED, events[0].event_type); | 207 EXPECT_EQ(SocketStreamEvent::EVENT_AUTH_REQUIRED, events[0].event_type); |
208 EXPECT_EQ(SocketStreamEvent::EVENT_CONNECTED, events[1].event_type); | 208 EXPECT_EQ(SocketStreamEvent::EVENT_CONNECTED, events[1].event_type); |
209 EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[2].event_type); | 209 EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[2].event_type); |
210 | 210 |
211 // The first and last entries of the LoadLog should be for | 211 // The first and last entries of the LoadLog should be for |
212 // SOCKET_STREAM_CONNECT. | 212 // SOCKET_STREAM_CONNECT. |
213 ExpectLogContains(socket_stream->load_log(), 0, | 213 EXPECT_TRUE(LogContainsBeginEvent( |
214 LoadLog::TYPE_SOCKET_STREAM_CONNECT, | 214 *socket_stream->load_log(), 0, LoadLog::TYPE_SOCKET_STREAM_CONNECT)); |
215 LoadLog::PHASE_BEGIN); | 215 EXPECT_TRUE(LogContainsEndEvent( |
216 ExpectLogContains(socket_stream->load_log(), | 216 *socket_stream->load_log(), -1, LoadLog::TYPE_SOCKET_STREAM_CONNECT)); |
217 socket_stream->load_log()->entries().size() - 1, | |
218 LoadLog::TYPE_SOCKET_STREAM_CONNECT, | |
219 LoadLog::PHASE_END); | |
220 } | 217 } |
221 | 218 |
222 } // namespace net | 219 } // namespace net |
OLD | NEW |