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

Side by Side Diff: chrome/browser/net/load_timing_observer_unittest.cc

Issue 3028026: Fix bug which caused DNS time not to be reported by LoadTimingObserver. (Closed)
Patch Set: Indentation fix Created 10 years, 5 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
« no previous file with comments | « chrome/browser/net/load_timing_observer.cc ('k') | webkit/glue/resource_loader_bridge.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/net/load_timing_observer.h" 5 #include "chrome/browser/net/load_timing_observer.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 // Add resolver entry. 217 // Add resolver entry.
218 AddStartConnectJobEntries(observer, 1); 218 AddStartConnectJobEntries(observer, 1);
219 NetLog::Source connect_source(NetLog::SOURCE_CONNECT_JOB, 1); 219 NetLog::Source connect_source(NetLog::SOURCE_CONNECT_JOB, 1);
220 AddStartEntry(observer, 220 AddStartEntry(observer,
221 connect_source, 221 connect_source,
222 NetLog::TYPE_HOST_RESOLVER_IMPL, 222 NetLog::TYPE_HOST_RESOLVER_IMPL,
223 NULL); 223 NULL);
224 current_time += TimeDelta::FromSeconds(2); 224 current_time += TimeDelta::FromSeconds(2);
225 AddEndEntry(observer, connect_source, NetLog::TYPE_HOST_RESOLVER_IMPL, NULL); 225 AddEndEntry(observer, connect_source, NetLog::TYPE_HOST_RESOLVER_IMPL, NULL);
226 AddEndConnectJobEntries(observer, 1);
226 227
227 // Bind to connect job. 228 // Bind to connect job.
228 scoped_refptr<net::NetLogSourceParameter> params( 229 scoped_refptr<net::NetLogSourceParameter> params(
229 new net::NetLogSourceParameter("connect_job", connect_source)); 230 new net::NetLogSourceParameter("connect_job", connect_source));
230 AddStartEntry(observer, 231 AddStartEntry(observer,
231 source, 232 source,
232 NetLog::TYPE_SOCKET_POOL_BOUND_TO_CONNECT_JOB, 233 NetLog::TYPE_SOCKET_POOL_BOUND_TO_CONNECT_JOB,
233 params.get()); 234 params.get());
234 235
235 LoadTimingObserver::URLRequestRecord* record = 236 LoadTimingObserver::URLRequestRecord* record =
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 AddStartEntry(observer, 313 AddStartEntry(observer,
313 source, 314 source,
314 NetLog::TYPE_SOCKET_POOL_BOUND_TO_SOCKET, 315 NetLog::TYPE_SOCKET_POOL_BOUND_TO_SOCKET,
315 params.get()); 316 params.get());
316 317
317 LoadTimingObserver::URLRequestRecord* record = 318 LoadTimingObserver::URLRequestRecord* record =
318 observer.GetURLRequestRecord(0); 319 observer.GetURLRequestRecord(0);
319 ASSERT_EQ(1000, record->timing.ssl_start); 320 ASSERT_EQ(1000, record->timing.ssl_start);
320 ASSERT_EQ(3000, record->timing.ssl_end); 321 ASSERT_EQ(3000, record->timing.ssl_end);
321 } 322 }
OLDNEW
« no previous file with comments | « chrome/browser/net/load_timing_observer.cc ('k') | webkit/glue/resource_loader_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698