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

Unified Diff: blimp/net/blimp_message_output_buffer_unittest.cc

Issue 1909143002: Use ConnectionErrorObserver, not callbacks, for error handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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: blimp/net/blimp_message_output_buffer_unittest.cc
diff --git a/blimp/net/blimp_message_output_buffer_unittest.cc b/blimp/net/blimp_message_output_buffer_unittest.cc
index 6db7ec2a2aec04abae594ee953f7e763cf1eac73..064ed900397d60d687ae3f2732c13f57a345f867 100644
--- a/blimp/net/blimp_message_output_buffer_unittest.cc
+++ b/blimp/net/blimp_message_output_buffer_unittest.cc
@@ -185,11 +185,11 @@ TEST_F(BlimpMessageOutputBufferTest, WriteError) {
complete_cb_1.callback());
ASSERT_EQ(1, buffer_->GetBufferByteSizeForTest());
- // First write attempt, which fails.
+ // First write attempt, which fails. The output buffer isn't notified of the
+ // connection loss, because the write callback is silently dropped.
ASSERT_TRUE(captured_cb_.is_null());
buffer_->SetOutputProcessor(&output_processor_);
ASSERT_FALSE(captured_cb_.is_null());
- base::ResetAndReturn(&captured_cb_).Run(net::ERR_FAILED);
ASSERT_EQ(1, buffer_->GetBufferByteSizeForTest());
ASSERT_EQ(0, buffer_->GetUnacknowledgedMessageCountForTest());
« blimp/net/blimp_message_output_buffer.cc ('K') | « blimp/net/blimp_message_output_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698