Index: net/spdy/spdy_network_transaction_unittest.cc |
=================================================================== |
--- net/spdy/spdy_network_transaction_unittest.cc (revision 42660) |
+++ net/spdy/spdy_network_transaction_unittest.cc (working copy) |
@@ -22,6 +22,8 @@ |
#include "net/spdy/spdy_protocol.h" |
#include "testing/platform_test.h" |
+#define NET_TRACE(level, s) DLOG(level) << s << __FUNCTION__ << "() " |
+ |
//----------------------------------------------------------------------------- |
namespace net { |
@@ -691,21 +693,21 @@ |
EndLoop(); |
if ((next_read.sequence_number & ~MockRead::STOPLOOP) <= |
sequence_number_++) { |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
- << sequence_number_ - 1 << ": Read " << read_index(); |
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ - 1 |
+ << ": Read " << read_index(); |
DumpMockRead(next_read); |
return StaticSocketDataProvider::GetNextRead(); |
} |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
- << sequence_number_ - 1 << ": I/O Pending"; |
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ - 1 |
+ << ": I/O Pending"; |
MockRead result = MockRead(true, ERR_IO_PENDING); |
DumpMockRead(result); |
return result; |
} |
virtual MockWriteResult OnWrite(const std::string& data) { |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
- << sequence_number_ << ": Write " << write_index(); |
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ |
+ << ": Write " << write_index(); |
DumpMockRead(PeekWrite()); |
++sequence_number_; |
MessageLoop::current()->PostDelayedTask(FROM_HERE, |
@@ -714,7 +716,7 @@ |
} |
virtual void Reset() { |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
+ NET_TRACE(INFO, " *** ") << "Stage " |
<< sequence_number_ << ": Reset()"; |
sequence_number_ = 0; |
loop_stop_stage_ = 0; |
@@ -731,22 +733,21 @@ |
void EndLoop() { |
// If we've already stopped the loop, don't do it again until we've advanced |
// to the next sequence_number. |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
- << sequence_number_ << ": EndLoop()"; |
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ << ": EndLoop()"; |
if (loop_stop_stage_ > 0) { |
const MockRead& next_read = StaticSocketDataProvider::PeekRead(); |
if ((next_read.sequence_number & ~MockRead::STOPLOOP) > |
loop_stop_stage_) { |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
- << sequence_number_ << ": Clearing stop index"; |
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ |
+ << ": Clearing stop index"; |
loop_stop_stage_ = 0; |
} else { |
return; |
} |
} |
// Record the sequence_number at which we stopped the loop. |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
- << sequence_number_ << ": Posting Quit at read " << read_index(); |
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ |
+ << ": Posting Quit at read " << read_index(); |
loop_stop_stage_ = sequence_number_; |
if (callback_) |
callback_->RunWithParams(Tuple1<int>(ERR_IO_PENDING)); |
@@ -754,8 +755,7 @@ |
void CompleteRead() { |
if (socket()) { |
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage " |
- << sequence_number_; |
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_; |
socket()->OnReadComplete(GetNextRead()); |
} |
} |