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

Unified Diff: remoting/protocol/jingle_session_unittest.cc

Issue 551173004: Move PseudoTCP and channel auth out of LibjingleTransportFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_dgrams
Patch Set: Created 6 years, 3 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
Index: remoting/protocol/jingle_session_unittest.cc
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
index 882e24dd6f22aa1f16740635bc5ad16c46b6d99d..d915ee912e32c0b40d1b5b1feda32e84aa528e4c 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -16,6 +16,7 @@
#include "remoting/base/constants.h"
#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/channel_authenticator.h"
+#include "remoting/protocol/channel_factory.h"
#include "remoting/protocol/chromium_port_allocator.h"
#include "remoting/protocol/connection_tester.h"
#include "remoting/protocol/fake_authenticator.h"
@@ -508,14 +509,21 @@ TEST_F(JingleSessionTest, TestFailedChannelAuth) {
// Terminate the message loop when we get rejection notification
// from the host.
+ bool client_callback_called = false;
EXPECT_CALL(host_channel_callback_, OnDone(NULL))
.WillOnce(QuitThread());
EXPECT_CALL(client_channel_callback_, OnDone(_))
- .Times(AtMost(1));
+ .Times(AtMost(1))
+ .WillOnce(testing::Assign(&client_callback_called, true));
ExpectRouteChange(kChannelName);
message_loop_->Run();
+ if (!client_callback_called) {
Wez 2014/09/10 02:29:26 Why would the callback not be called, after this c
Sergey Ulanov 2014/09/10 21:50:59 It's not called and DCHECKs were failing because C
Wez 2014/09/10 22:19:41 Should we make the test ordering deterministic, an
Sergey Ulanov 2014/09/10 22:49:30 Done. I don't think we need two tests here - this
+ client_session_->GetTransportChannelFactory()->CancelChannelCreation(
+ kChannelName);
+ }
+
EXPECT_TRUE(!host_socket_.get());
}

Powered by Google App Engine
This is Rietveld 408576698