OLD | NEW |
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" |
| 11 #include "chrome/browser/browser_thread.h" |
11 #include "net/base/load_flags.h" | 12 #include "net/base/load_flags.h" |
12 #include "net/url_request/url_request_netlog_params.h" | 13 #include "net/url_request/url_request_netlog_params.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 using net::NetLog; | 18 using net::NetLog; |
18 using base::TimeDelta; | 19 using base::TimeDelta; |
19 | 20 |
20 // Serves to Identify the current thread as the IO thread. | 21 // Serves to Identify the current thread as the IO thread. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 AddStartEntry(observer, | 325 AddStartEntry(observer, |
325 source, | 326 source, |
326 NetLog::TYPE_SOCKET_POOL_BOUND_TO_SOCKET, | 327 NetLog::TYPE_SOCKET_POOL_BOUND_TO_SOCKET, |
327 params.get()); | 328 params.get()); |
328 | 329 |
329 LoadTimingObserver::URLRequestRecord* record = | 330 LoadTimingObserver::URLRequestRecord* record = |
330 observer.GetURLRequestRecord(0); | 331 observer.GetURLRequestRecord(0); |
331 ASSERT_EQ(1000, record->timing.ssl_start); | 332 ASSERT_EQ(1000, record->timing.ssl_start); |
332 ASSERT_EQ(3000, record->timing.ssl_end); | 333 ASSERT_EQ(3000, record->timing.ssl_end); |
333 } | 334 } |
OLD | NEW |