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

Side by Side Diff: net/socket_stream/socket_stream_unittest.cc

Issue 551135: Cleanup the unittest helpers in load_log_unittest.h.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Sync and merge conflicts Created 10 years, 10 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
« no previous file with comments | « net/socket/tcp_client_socket_unittest.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_unittest.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698