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

Unified Diff: chrome/browser/net/load_timing_observer_unittest.cc

Issue 4118004: Update NetLog to be thread safe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add short test description Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/load_timing_observer_unittest.cc
===================================================================
--- chrome/browser/net/load_timing_observer_unittest.cc (revision 66783)
+++ chrome/browser/net/load_timing_observer_unittest.cc (working copy)
@@ -83,6 +83,8 @@
// Test that URLRequest with no load timing flag is not processed.
TEST(LoadTimingObserverTest, NoLoadTimingEnabled) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
eroman 2010/11/30 01:43:37 I suggest using a test fixture instead. If I am r
mmenke 2010/11/30 18:59:04 Done.
LoadTimingObserver observer;
AddStartURLRequestEntries(observer, 0, false);
@@ -93,6 +95,8 @@
// Test that URLRequestRecord is created, deleted and is not growing unbound.
TEST(LoadTimingObserverTest, URLRequestRecord) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
// Create record.
@@ -115,6 +119,8 @@
// Test that ConnectJobRecord is created, deleted and is not growing unbound.
TEST(LoadTimingObserverTest, ConnectJobRecord) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
// Create record.
@@ -136,6 +142,8 @@
// Test that SocketRecord is created, deleted and is not growing unbound.
TEST(LoadTimingObserverTest, SocketRecord) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
// Create record.
@@ -158,6 +166,8 @@
// Test that basic time is set to the request.
TEST(LoadTimingObserverTest, BaseTicks) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
current_time += TimeDelta::FromSeconds(1);
AddStartURLRequestEntries(observer, 0, true);
@@ -169,6 +179,8 @@
// Test proxy time detection.
TEST(LoadTimingObserverTest, ProxyTime) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
current_time += TimeDelta::FromSeconds(1);
@@ -188,6 +200,8 @@
// Test connect time detection.
TEST(LoadTimingObserverTest, ConnectTime) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
current_time += TimeDelta::FromSeconds(1);
@@ -207,6 +221,8 @@
// Test dns time detection.
TEST(LoadTimingObserverTest, DnsTime) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
// Start request.
@@ -241,6 +257,8 @@
// Test send time detection.
TEST(LoadTimingObserverTest, SendTime) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
// Start request.
@@ -267,6 +285,8 @@
// Test receive time detection.
TEST(LoadTimingObserverTest, ReceiveTime) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
// Start request.
@@ -293,6 +313,8 @@
// Test ssl time detection.
TEST(LoadTimingObserverTest, SslTime) {
+ MessageLoop message_loop;
+ BrowserThread io_thread(BrowserThread::IO, &message_loop);
LoadTimingObserver observer;
// Start request.
Property changes on: chrome\browser\net\load_timing_observer_unittest.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698