OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 ASSERT_TRUE(RunMessageLoopWithTimeout(TestTimeouts::action_max_timeout_ms())); | 642 ASSERT_TRUE(RunMessageLoopWithTimeout(TestTimeouts::action_max_timeout_ms())); |
643 } | 643 } |
644 | 644 |
645 // Verify that we can connect two endpoints. | 645 // Verify that we can connect two endpoints. |
646 TEST_F(JingleSessionTest, Connect) { | 646 TEST_F(JingleSessionTest, Connect) { |
647 CreateServerPair(); | 647 CreateServerPair(); |
648 ASSERT_TRUE(InitiateConnection()); | 648 ASSERT_TRUE(InitiateConnection()); |
649 } | 649 } |
650 | 650 |
651 // Verify that data can be transmitted over the event channel. | 651 // Verify that data can be transmitted over the event channel. |
652 TEST_F(JingleSessionTest, TestControlChannel) { | 652 // TODO(wez): See crbug.com/88726 |
| 653 TEST_F(JingleSessionTest, FLAKY_TestControlChannel) { |
653 CreateServerPair(); | 654 CreateServerPair(); |
654 ASSERT_TRUE(InitiateConnection()); | 655 ASSERT_TRUE(InitiateConnection()); |
655 scoped_refptr<TCPChannelTester> tester( | 656 scoped_refptr<TCPChannelTester> tester( |
656 new TCPChannelTester(host_session_.get(), client_session_.get(), | 657 new TCPChannelTester(host_session_.get(), client_session_.get(), |
657 kMessageSize, kMessages)); | 658 kMessageSize, kMessages)); |
658 tester->Start(ChannelTesterBase::CONTROL); | 659 tester->Start(ChannelTesterBase::CONTROL); |
659 ASSERT_TRUE(tester->WaitFinished()); | 660 ASSERT_TRUE(tester->WaitFinished()); |
660 tester->CheckResults(); | 661 tester->CheckResults(); |
661 | 662 |
662 // Connections must be closed while |tester| still exists. | 663 // Connections must be closed while |tester| still exists. |
663 CloseSessions(); | 664 CloseSessions(); |
664 } | 665 } |
665 | 666 |
666 // Verify that data can be transmitted over the video channel. | 667 // Verify that data can be transmitted over the video channel. |
667 TEST_F(JingleSessionTest, TestVideoChannel) { | 668 // TODO(wez): See crbug.com/88726 |
| 669 TEST_F(JingleSessionTest, FLAKY_TestVideoChannel) { |
668 CreateServerPair(); | 670 CreateServerPair(); |
669 ASSERT_TRUE(InitiateConnection()); | 671 ASSERT_TRUE(InitiateConnection()); |
670 scoped_refptr<TCPChannelTester> tester( | 672 scoped_refptr<TCPChannelTester> tester( |
671 new TCPChannelTester(host_session_.get(), client_session_.get(), | 673 new TCPChannelTester(host_session_.get(), client_session_.get(), |
672 kMessageSize, kMessageSize)); | 674 kMessageSize, kMessageSize)); |
673 tester->Start(ChannelTesterBase::VIDEO); | 675 tester->Start(ChannelTesterBase::VIDEO); |
674 ASSERT_TRUE(tester->WaitFinished()); | 676 ASSERT_TRUE(tester->WaitFinished()); |
675 tester->CheckResults(); | 677 tester->CheckResults(); |
676 | 678 |
677 // Connections must be closed while |tester| still exists. | 679 // Connections must be closed while |tester| still exists. |
678 CloseSessions(); | 680 CloseSessions(); |
679 } | 681 } |
680 | 682 |
681 // Verify that data can be transmitted over the event channel. | 683 // Verify that data can be transmitted over the event channel. |
682 TEST_F(JingleSessionTest, TestEventChannel) { | 684 // TODO(wez): See crbug.com/88726 |
| 685 TEST_F(JingleSessionTest, FLAKY_TestEventChannel) { |
683 CreateServerPair(); | 686 CreateServerPair(); |
684 ASSERT_TRUE(InitiateConnection()); | 687 ASSERT_TRUE(InitiateConnection()); |
685 scoped_refptr<TCPChannelTester> tester( | 688 scoped_refptr<TCPChannelTester> tester( |
686 new TCPChannelTester(host_session_.get(), client_session_.get(), | 689 new TCPChannelTester(host_session_.get(), client_session_.get(), |
687 kMessageSize, kMessageSize)); | 690 kMessageSize, kMessageSize)); |
688 tester->Start(ChannelTesterBase::EVENT); | 691 tester->Start(ChannelTesterBase::EVENT); |
689 ASSERT_TRUE(tester->WaitFinished()); | 692 ASSERT_TRUE(tester->WaitFinished()); |
690 tester->CheckResults(); | 693 tester->CheckResults(); |
691 | 694 |
692 // Connections must be closed while |tester| still exists. | 695 // Connections must be closed while |tester| still exists. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 << tester->GetElapsedTime().InMilliseconds() << " ms."; | 746 << tester->GetElapsedTime().InMilliseconds() << " ms."; |
744 | 747 |
745 // Connections must be closed while |tester| still exists. | 748 // Connections must be closed while |tester| still exists. |
746 CloseSessions(); | 749 CloseSessions(); |
747 } | 750 } |
748 | 751 |
749 #endif | 752 #endif |
750 | 753 |
751 } // namespace protocol | 754 } // namespace protocol |
752 } // namespace remoting | 755 } // namespace remoting |
OLD | NEW |