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

Unified Diff: remoting/protocol/jingle_session_unittest.cc

Issue 1493083002: Remove QUIC support from remoting host and client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « remoting/protocol/jingle_session.cc ('k') | remoting/protocol/quic_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session_unittest.cc
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
index 21dac5c3a62a3b00a9434f738422c8bbdbb0c46d..4913578db5ad1878d5d630f3d94da922ae8fb445 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -525,55 +525,16 @@ TEST_F(JingleSessionTest, TestMuxStreamChannel) {
tester.CheckResults();
}
-// Verify that data can be sent over a QUIC channel.
-TEST_F(JingleSessionTest, TestQuicStreamChannel) {
- CreateSessionManagers(1, FakeAuthenticator::ACCEPT);
-
- scoped_ptr<CandidateSessionConfig> config =
- CandidateSessionConfig::CreateDefault();
- config->PreferTransport(ChannelConfig::TRANSPORT_QUIC_STREAM);
- client_server_->set_protocol_config(config.Pass());
-
- ExpectRouteChange(kQuicChannelName);
-
- ASSERT_NO_FATAL_FAILURE(
- InitiateConnection(1, FakeAuthenticator::ACCEPT, false));
-
- int counter = 2;
- EXPECT_CALL(client_channel_callback_, OnDone(_))
- .WillOnce(QuitThreadOnCounter(&counter));
- EXPECT_CALL(host_channel_callback_, OnDone(_))
- .WillOnce(QuitThreadOnCounter(&counter));
-
- client_session_->GetQuicChannelFactory()->CreateChannel(
- kChannelName, base::Bind(&JingleSessionTest::OnClientChannelCreated,
- base::Unretained(this)));
- host_session_->GetQuicChannelFactory()->CreateChannel(
- kChannelName, base::Bind(&JingleSessionTest::OnHostChannelCreated,
- base::Unretained(this)));
-
- message_loop_->Run();
-
- EXPECT_TRUE(client_socket_.get());
- EXPECT_TRUE(host_socket_.get());
-
- StreamConnectionTester tester(host_socket_.get(), client_socket_.get(),
- kMessageSize, kMessages);
- tester.Start();
- message_loop_->Run();
- tester.CheckResults();
-}
-
// Verify that channels are never marked connected if transport is broken.
TEST_F(JingleSessionTest, TestBrokenTransport) {
// Allow only incoming connections on both ends, which effectively renders P2P
- // transport unusable as.
+ // transport unusable.
network_settings_ = NetworkSettings(NetworkSettings::NAT_TRAVERSAL_DISABLED);
CreateSessionManagers(1, FakeAuthenticator::ACCEPT);
scoped_ptr<CandidateSessionConfig> config =
CandidateSessionConfig::CreateDefault();
- config->PreferTransport(ChannelConfig::TRANSPORT_QUIC_STREAM);
+ config->PreferTransport(ChannelConfig::TRANSPORT_MUX_STREAM);
client_server_->set_protocol_config(config.Pass());
ASSERT_NO_FATAL_FAILURE(
@@ -582,10 +543,12 @@ TEST_F(JingleSessionTest, TestBrokenTransport) {
EXPECT_CALL(client_channel_callback_, OnDone(_)).Times(0);
EXPECT_CALL(host_channel_callback_, OnDone(_)).Times(0);
- client_session_->GetQuicChannelFactory()->CreateChannel(
- kChannelName, base::Bind(&JingleSessionTest::OnClientChannelCreated,
- base::Unretained(this)));
- host_session_->GetQuicChannelFactory()->CreateChannel(
+ client_session_->GetTransport()
+ ->GetMultiplexedChannelFactory()
+ ->CreateChannel(kChannelName,
+ base::Bind(&JingleSessionTest::OnClientChannelCreated,
+ base::Unretained(this)));
+ host_session_->GetTransport()->GetMultiplexedChannelFactory()->CreateChannel(
kChannelName, base::Bind(&JingleSessionTest::OnHostChannelCreated,
base::Unretained(this)));
@@ -595,8 +558,12 @@ TEST_F(JingleSessionTest, TestBrokenTransport) {
EXPECT_FALSE(client_socket_);
EXPECT_FALSE(host_socket_);
- client_session_->GetQuicChannelFactory()->CancelChannelCreation(kChannelName);
- host_session_->GetQuicChannelFactory()->CancelChannelCreation(kChannelName);
+ client_session_->GetTransport()
+ ->GetMultiplexedChannelFactory()
+ ->CancelChannelCreation(kChannelName);
+ host_session_->GetTransport()
+ ->GetMultiplexedChannelFactory()
+ ->CancelChannelCreation(kChannelName);
}
// Verify that we can connect channels with multistep auth.
« no previous file with comments | « remoting/protocol/jingle_session.cc ('k') | remoting/protocol/quic_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698