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

Side by Side Diff: net/spdy/bidirectional_stream_spdy_impl_unittest.cc

Issue 2053133002: Remove MessageLoop::current()->RunUntilIdle() in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/bidirectional_stream_spdy_impl.h" 5 #include "net/spdy/bidirectional_stream_spdy_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 delegate->SendData(buf.get(), buf->size(), false); 353 delegate->SendData(buf.get(), buf->size(), false);
354 sequenced_data_->Resume(); 354 sequenced_data_->Resume();
355 base::RunLoop().RunUntilIdle(); 355 base::RunLoop().RunUntilIdle();
356 // Cancel the stream. 356 // Cancel the stream.
357 delegate->CancelStream(); 357 delegate->CancelStream();
358 sequenced_data_->Resume(); 358 sequenced_data_->Resume();
359 base::RunLoop().RunUntilIdle(); 359 base::RunLoop().RunUntilIdle();
360 360
361 // Try to send data after Cancel(), should not get called back. 361 // Try to send data after Cancel(), should not get called back.
362 delegate->SendData(buf.get(), buf->size(), false); 362 delegate->SendData(buf.get(), buf->size(), false);
363 base::MessageLoop::current()->RunUntilIdle(); 363 base::RunLoop().RunUntilIdle();
364 EXPECT_FALSE(delegate->on_failed_called()); 364 EXPECT_FALSE(delegate->on_failed_called());
365 365
366 EXPECT_EQ("200", delegate->response_headers().find(":status")->second); 366 EXPECT_EQ("200", delegate->response_headers().find(":status")->second);
367 EXPECT_EQ(0, delegate->on_data_read_count()); 367 EXPECT_EQ(0, delegate->on_data_read_count());
368 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); 368 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol());
369 EXPECT_EQ(0, delegate->GetTotalSentBytes()); 369 EXPECT_EQ(0, delegate->GetTotalSentBytes());
370 EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); 370 EXPECT_EQ(0, delegate->GetTotalReceivedBytes());
371 } 371 }
372 372
373 } // namespace net 373 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/transport_client_socket_pool_unittest.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698