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

Unified Diff: remoting/protocol/jingle_session_unittest.cc

Issue 1277093006: Enable QUIC support in chromoting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quic_adapters
Patch Set: Created 5 years, 4 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
« no previous file with comments | « remoting/protocol/jingle_session.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.cc » ('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 fff9efb0c80e4caa8f87269c647f6eb7c719bb6d..54702e89d376a514088061ce77f7416b13845b11 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -402,7 +402,7 @@ TEST_F(JingleSessionTest, TestIncompatibleProtocol) {
scoped_ptr<CandidateSessionConfig> config =
CandidateSessionConfig::CreateDefault();
- // Disable all video codecs so the host will reject connection
+ // Disable all video codecs so the host will reject connection.
config->mutable_video_configs()->clear();
client_server_->set_protocol_config(config.Pass());
client_session_ = client_server_->Connect(kHostJid, authenticator.Pass());
@@ -521,6 +521,44 @@ 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());
+
+ ASSERT_NO_FATAL_FAILURE(
+ InitiateConnection(1, FakeAuthenticator::ACCEPT, false));
+
+ int counter = 2;
+ ExpectRouteChange(kQuicChannelName);
+ 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 we can connect channels with multistep auth.
TEST_F(JingleSessionTest, TestMultistepAuthStreamChannel) {
CreateSessionManagers(3, FakeAuthenticator::ACCEPT);
« no previous file with comments | « remoting/protocol/jingle_session.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698