Index: chrome/browser/net/load_timing_observer_unittest.cc |
=================================================================== |
--- chrome/browser/net/load_timing_observer_unittest.cc (revision 67848) |
+++ chrome/browser/net/load_timing_observer_unittest.cc (working copy) |
@@ -17,6 +17,17 @@ |
using net::NetLog; |
using base::TimeDelta; |
+// Serves to Identify the current thread as the IO thread. |
+class LoadTimingObserverTest : public testing::Test { |
+ public: |
+ LoadTimingObserverTest() : io_thread_(BrowserThread::IO, &message_loop_) { |
+ } |
+ |
+ private: |
+ MessageLoop message_loop_; |
+ BrowserThread io_thread_; |
+}; |
+ |
base::TimeTicks current_time; |
void AddStartEntry(LoadTimingObserver& observer, |
@@ -82,7 +93,7 @@ |
} // namespace |
// Test that net::URLRequest with no load timing flag is not processed. |
-TEST(LoadTimingObserverTest, NoLoadTimingEnabled) { |
+TEST_F(LoadTimingObserverTest, NoLoadTimingEnabled) { |
LoadTimingObserver observer; |
AddStartURLRequestEntries(observer, 0, false); |
@@ -92,7 +103,7 @@ |
} |
// Test that URLRequestRecord is created, deleted and is not growing unbound. |
-TEST(LoadTimingObserverTest, URLRequestRecord) { |
+TEST_F(LoadTimingObserverTest, URLRequestRecord) { |
LoadTimingObserver observer; |
// Create record. |
@@ -114,7 +125,7 @@ |
} |
// Test that ConnectJobRecord is created, deleted and is not growing unbound. |
-TEST(LoadTimingObserverTest, ConnectJobRecord) { |
+TEST_F(LoadTimingObserverTest, ConnectJobRecord) { |
LoadTimingObserver observer; |
// Create record. |
@@ -135,7 +146,7 @@ |
} |
// Test that SocketRecord is created, deleted and is not growing unbound. |
-TEST(LoadTimingObserverTest, SocketRecord) { |
+TEST_F(LoadTimingObserverTest, SocketRecord) { |
LoadTimingObserver observer; |
// Create record. |
@@ -157,7 +168,7 @@ |
} |
// Test that basic time is set to the request. |
-TEST(LoadTimingObserverTest, BaseTicks) { |
+TEST_F(LoadTimingObserverTest, BaseTicks) { |
LoadTimingObserver observer; |
current_time += TimeDelta::FromSeconds(1); |
AddStartURLRequestEntries(observer, 0, true); |
@@ -168,7 +179,7 @@ |
} |
// Test proxy time detection. |
-TEST(LoadTimingObserverTest, ProxyTime) { |
+TEST_F(LoadTimingObserverTest, ProxyTime) { |
LoadTimingObserver observer; |
current_time += TimeDelta::FromSeconds(1); |
@@ -187,7 +198,7 @@ |
} |
// Test connect time detection. |
-TEST(LoadTimingObserverTest, ConnectTime) { |
+TEST_F(LoadTimingObserverTest, ConnectTime) { |
LoadTimingObserver observer; |
current_time += TimeDelta::FromSeconds(1); |
@@ -206,7 +217,7 @@ |
} |
// Test dns time detection. |
-TEST(LoadTimingObserverTest, DnsTime) { |
+TEST_F(LoadTimingObserverTest, DnsTime) { |
LoadTimingObserver observer; |
// Start request. |
@@ -240,7 +251,7 @@ |
} |
// Test send time detection. |
-TEST(LoadTimingObserverTest, SendTime) { |
+TEST_F(LoadTimingObserverTest, SendTime) { |
LoadTimingObserver observer; |
// Start request. |
@@ -266,7 +277,7 @@ |
} |
// Test receive time detection. |
-TEST(LoadTimingObserverTest, ReceiveTime) { |
+TEST_F(LoadTimingObserverTest, ReceiveTime) { |
LoadTimingObserver observer; |
// Start request. |
@@ -292,7 +303,7 @@ |
} |
// Test ssl time detection. |
-TEST(LoadTimingObserverTest, SslTime) { |
+TEST_F(LoadTimingObserverTest, SslTime) { |
LoadTimingObserver observer; |
// Start request. |
Property changes on: chrome\browser\net\load_timing_observer_unittest.cc |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |