Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/net/blimp_connection.h" | 5 #include "blimp/net/blimp_connection.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 net::TestCompletionCallback complete_cb_1; | 125 net::TestCompletionCallback complete_cb_1; |
| 126 sender->ProcessMessage(CreateInputMessage(), | 126 sender->ProcessMessage(CreateInputMessage(), |
| 127 complete_cb_1.callback()); | 127 complete_cb_1.callback()); |
| 128 base::ResetAndReturn(&write_packet_cb).Run(net::OK); | 128 base::ResetAndReturn(&write_packet_cb).Run(net::OK); |
| 129 EXPECT_EQ(net::OK, complete_cb_1.WaitForResult()); | 129 EXPECT_EQ(net::OK, complete_cb_1.WaitForResult()); |
| 130 | 130 |
| 131 net::TestCompletionCallback complete_cb_2; | 131 net::TestCompletionCallback complete_cb_2; |
| 132 sender->ProcessMessage(CreateControlMessage(), | 132 sender->ProcessMessage(CreateControlMessage(), |
| 133 complete_cb_2.callback()); | 133 complete_cb_2.callback()); |
| 134 base::ResetAndReturn(&write_packet_cb).Run(net::ERR_FAILED); | 134 base::ResetAndReturn(&write_packet_cb).Run(net::ERR_FAILED); |
| 135 EXPECT_EQ(net::ERR_FAILED, complete_cb_2.WaitForResult()); | |
|
Wez
2016/04/21 22:44:29
Can we assert that the second callback has not bee
Kevin M
2016/04/22 22:10:41
Done.
| |
| 136 } | 135 } |
| 137 | 136 |
| 138 } // namespace | 137 } // namespace |
| 139 } // namespace blimp | 138 } // namespace blimp |
| OLD | NEW |