Chromium Code Reviews| Index: blimp/net/blimp_connection_unittest.cc |
| diff --git a/blimp/net/blimp_connection_unittest.cc b/blimp/net/blimp_connection_unittest.cc |
| index 59c7a39a370f218e2a17c58283f87dd14d19822b..9b5d24695ef11407d06946fba5f53d4f4540e93f 100644 |
| --- a/blimp/net/blimp_connection_unittest.cc |
| +++ b/blimp/net/blimp_connection_unittest.cc |
| @@ -46,6 +46,8 @@ class BlimpConnectionTest : public testing::Test { |
| ~BlimpConnectionTest() override {} |
| + void DropConnection() { connection_.reset(); } |
| + |
| protected: |
| std::unique_ptr<BlimpMessage> CreateInputMessage() { |
| std::unique_ptr<BlimpMessage> msg(new BlimpMessage); |
| @@ -119,7 +121,9 @@ TEST_F(BlimpConnectionTest, AsyncTwoPacketsWriteWithError) { |
| .WillOnce(SaveArg<1>(&write_packet_cb)) |
| .RetiresOnSaturation(); |
| EXPECT_CALL(error_observer1_, OnConnectionError(net::ERR_FAILED)); |
| - EXPECT_CALL(error_observer2_, OnConnectionError(net::ERR_FAILED)); |
| + EXPECT_CALL(error_observer2_, OnConnectionError(net::ERR_FAILED)) |
| + .WillOnce(testing::InvokeWithoutArgs( |
| + this, &BlimpConnectionTest::DropConnection)); |
|
Wez
2016/05/25 03:28:35
You don't want to add a separate, dedicated test?
Kevin M
2016/05/25 20:40:25
Done.
|
| BlimpMessageProcessor* sender = connection_->GetOutgoingMessageProcessor(); |
| net::TestCompletionCallback complete_cb_1; |