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

Side by Side Diff: remoting/protocol/jingle_session_unittest.cc

Issue 594743002: Fix side-effect in DCHECK that breaks another DCHECK in JingleSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/jingle_session.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/protocol/jingle_session.h" 5 #include "remoting/protocol/jingle_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 ExpectRouteChange(kChannelName); 514 ExpectRouteChange(kChannelName);
515 515
516 message_loop_->Run(); 516 message_loop_->Run();
517 517
518 client_session_->GetTransportChannelFactory()->CancelChannelCreation( 518 client_session_->GetTransportChannelFactory()->CancelChannelCreation(
519 kChannelName); 519 kChannelName);
520 520
521 EXPECT_TRUE(!host_socket_.get()); 521 EXPECT_TRUE(!host_socket_.get());
522 } 522 }
523 523
524 TEST_F(JingleSessionTest, TestCancelChannelCreation) {
525 CreateSessionManagers(1, FakeAuthenticator::REJECT_CHANNEL);
526 ASSERT_NO_FATAL_FAILURE(
527 InitiateConnection(1, FakeAuthenticator::ACCEPT, false));
528
529 client_session_->GetTransportChannelFactory()->CreateChannel(
530 kChannelName, base::Bind(&JingleSessionTest::OnClientChannelCreated,
531 base::Unretained(this)));
532 client_session_->GetTransportChannelFactory()->CancelChannelCreation(
533 kChannelName);
534
535 EXPECT_TRUE(!client_socket_.get());
536 }
537
524 } // namespace protocol 538 } // namespace protocol
525 } // namespace remoting 539 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698