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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 ASSERT_TRUE(RunMessageLoopWithTimeout(TestTimeouts::action_max_timeout_ms())); | 634 ASSERT_TRUE(RunMessageLoopWithTimeout(TestTimeouts::action_max_timeout_ms())); |
635 } | 635 } |
636 | 636 |
637 // Verify that we can connect two endpoints. | 637 // Verify that we can connect two endpoints. |
638 TEST_F(JingleSessionTest, Connect) { | 638 TEST_F(JingleSessionTest, Connect) { |
639 CreateServerPair(); | 639 CreateServerPair(); |
640 ASSERT_TRUE(InitiateConnection()); | 640 ASSERT_TRUE(InitiateConnection()); |
641 } | 641 } |
642 | 642 |
643 // Verify that data can be transmitted over the event channel. | 643 // Verify that data can be transmitted over the event channel. |
644 // TODO(wez): See crbug.com/88726 | 644 TEST_F(JingleSessionTest, TestControlChannel) { |
645 TEST_F(JingleSessionTest, FLAKY_TestControlChannel) { | |
646 CreateServerPair(); | 645 CreateServerPair(); |
647 ASSERT_TRUE(InitiateConnection()); | 646 ASSERT_TRUE(InitiateConnection()); |
648 scoped_refptr<TCPChannelTester> tester( | 647 scoped_refptr<TCPChannelTester> tester( |
649 new TCPChannelTester(host_session_.get(), client_session_.get(), | 648 new TCPChannelTester(host_session_.get(), client_session_.get(), |
650 kMessageSize, kMessages)); | 649 kMessageSize, kMessages)); |
651 tester->Start(ChannelTesterBase::CONTROL); | 650 tester->Start(ChannelTesterBase::CONTROL); |
652 ASSERT_TRUE(tester->WaitFinished()); | 651 ASSERT_TRUE(tester->WaitFinished()); |
653 tester->CheckResults(); | 652 tester->CheckResults(); |
654 | 653 |
655 // Connections must be closed while |tester| still exists. | 654 // Connections must be closed while |tester| still exists. |
656 CloseSessions(); | 655 CloseSessions(); |
657 } | 656 } |
658 | 657 |
659 // Verify that data can be transmitted over the video channel. | 658 // Verify that data can be transmitted over the video channel. |
660 // TODO(wez): See crbug.com/88726 | 659 TEST_F(JingleSessionTest, TestVideoChannel) { |
661 TEST_F(JingleSessionTest, FLAKY_TestVideoChannel) { | |
662 CreateServerPair(); | 660 CreateServerPair(); |
663 ASSERT_TRUE(InitiateConnection()); | 661 ASSERT_TRUE(InitiateConnection()); |
664 scoped_refptr<TCPChannelTester> tester( | 662 scoped_refptr<TCPChannelTester> tester( |
665 new TCPChannelTester(host_session_.get(), client_session_.get(), | 663 new TCPChannelTester(host_session_.get(), client_session_.get(), |
666 kMessageSize, kMessageSize)); | 664 kMessageSize, kMessageSize)); |
667 tester->Start(ChannelTesterBase::VIDEO); | 665 tester->Start(ChannelTesterBase::VIDEO); |
668 ASSERT_TRUE(tester->WaitFinished()); | 666 ASSERT_TRUE(tester->WaitFinished()); |
669 tester->CheckResults(); | 667 tester->CheckResults(); |
670 | 668 |
671 // Connections must be closed while |tester| still exists. | 669 // Connections must be closed while |tester| still exists. |
672 CloseSessions(); | 670 CloseSessions(); |
673 } | 671 } |
674 | 672 |
675 // Verify that data can be transmitted over the event channel. | 673 // Verify that data can be transmitted over the event channel. |
676 // TODO(wez): See crbug.com/88726 | 674 TEST_F(JingleSessionTest, TestEventChannel) { |
677 TEST_F(JingleSessionTest, FLAKY_TestEventChannel) { | |
678 CreateServerPair(); | 675 CreateServerPair(); |
679 ASSERT_TRUE(InitiateConnection()); | 676 ASSERT_TRUE(InitiateConnection()); |
680 scoped_refptr<TCPChannelTester> tester( | 677 scoped_refptr<TCPChannelTester> tester( |
681 new TCPChannelTester(host_session_.get(), client_session_.get(), | 678 new TCPChannelTester(host_session_.get(), client_session_.get(), |
682 kMessageSize, kMessageSize)); | 679 kMessageSize, kMessageSize)); |
683 tester->Start(ChannelTesterBase::EVENT); | 680 tester->Start(ChannelTesterBase::EVENT); |
684 ASSERT_TRUE(tester->WaitFinished()); | 681 ASSERT_TRUE(tester->WaitFinished()); |
685 tester->CheckResults(); | 682 tester->CheckResults(); |
686 | 683 |
687 // Connections must be closed while |tester| still exists. | 684 // Connections must be closed while |tester| still exists. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 ASSERT_TRUE(tester->WaitFinished()); | 733 ASSERT_TRUE(tester->WaitFinished()); |
737 LOG(INFO) << "Time for 500k bytes " | 734 LOG(INFO) << "Time for 500k bytes " |
738 << tester->GetElapsedTime().InMilliseconds() << " ms."; | 735 << tester->GetElapsedTime().InMilliseconds() << " ms."; |
739 | 736 |
740 // Connections must be closed while |tester| still exists. | 737 // Connections must be closed while |tester| still exists. |
741 CloseSessions(); | 738 CloseSessions(); |
742 } | 739 } |
743 | 740 |
744 } // namespace protocol | 741 } // namespace protocol |
745 } // namespace remoting | 742 } // namespace remoting |
OLD | NEW |