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

Side by Side Diff: blimp/net/blimp_connection_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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698