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

Unified Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 203013002: Fix "unreachable code" warnings (MSVC warning 4702) in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « net/http/http_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction_unittest.cc
===================================================================
--- net/spdy/spdy_network_transaction_unittest.cc (revision 257821)
+++ net/spdy/spdy_network_transaction_unittest.cc (working copy)
@@ -4225,22 +4225,17 @@
// Read Data
TestCompletionCallback read_callback;
- do {
- const int kReadSize = 256;
- scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kReadSize));
- rv = trans->Read(buf.get(), kReadSize, read_callback.callback());
- if (rv == net::ERR_IO_PENDING) {
- // Complete the read now, which causes buffering to start.
- data.CompleteRead();
- // Destroy the transaction, causing the stream to get cancelled
- // and orphaning the buffered IO task.
- helper.ResetTrans();
- break;
- }
- // We shouldn't get here in this test.
- FAIL() << "Unexpected read: " << rv;
- } while (rv > 0);
+ const int kReadSize = 256;
+ scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kReadSize));
+ rv = trans->Read(buf.get(), kReadSize, read_callback.callback());
+ ASSERT_EQ(net::ERR_IO_PENDING, rv) << "Unexpected read: " << rv;
+ // Complete the read now, which causes buffering to start.
+ data.CompleteRead();
+ // Destroy the transaction, causing the stream to get cancelled
+ // and orphaning the buffered IO task.
+ helper.ResetTrans();
+
// Flush the MessageLoop; this will cause the buffered IO task
// to run for the final time.
base::RunLoop().RunUntilIdle();
« no previous file with comments | « net/http/http_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698