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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 | « chrome/browser/net/load_timing_observer.cc ('k') | chrome/browser/net/net_pref_observer.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "content/test/test_browser_thread.h" 11 #include "content/test/test_browser_thread.h"
12 #include "net/base/load_flags.h" 12 #include "net/base/load_flags.h"
13 #include "net/url_request/url_request_netlog_params.h" 13 #include "net/url_request/url_request_netlog_params.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace { 16 namespace {
17 17
18 using base::TimeDelta;
19 using content::BrowserThread;
18 using net::NetLog; 20 using net::NetLog;
19 using base::TimeDelta;
20 21
21 // Serves to Identify the current thread as the IO thread. 22 // Serves to Identify the current thread as the IO thread.
22 class LoadTimingObserverTest : public testing::Test { 23 class LoadTimingObserverTest : public testing::Test {
23 public: 24 public:
24 LoadTimingObserverTest() : io_thread_(BrowserThread::IO, &message_loop_) { 25 LoadTimingObserverTest() : io_thread_(BrowserThread::IO, &message_loop_) {
25 } 26 }
26 27
27 private: 28 private:
28 MessageLoop message_loop_; 29 MessageLoop message_loop_;
29 content::TestBrowserThread io_thread_; 30 content::TestBrowserThread io_thread_;
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 AddStartHTTPStreamJobEntries(observer, 2); 394 AddStartHTTPStreamJobEntries(observer, 2);
394 395
395 BindHTTPStreamJobToSocket(observer, http_stream_job_source, socket_source); 396 BindHTTPStreamJobToSocket(observer, http_stream_job_source, socket_source);
396 BindURLRequestToHTTPStreamJob(observer, source, http_stream_job_source); 397 BindURLRequestToHTTPStreamJob(observer, source, http_stream_job_source);
397 398
398 LoadTimingObserver::URLRequestRecord* record = 399 LoadTimingObserver::URLRequestRecord* record =
399 observer.GetURLRequestRecord(0); 400 observer.GetURLRequestRecord(0);
400 ASSERT_EQ(1000, record->timing.ssl_start); 401 ASSERT_EQ(1000, record->timing.ssl_start);
401 ASSERT_EQ(3000, record->timing.ssl_end); 402 ASSERT_EQ(3000, record->timing.ssl_end);
402 } 403 }
OLDNEW
« no previous file with comments | « chrome/browser/net/load_timing_observer.cc ('k') | chrome/browser/net/net_pref_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698