OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 // ext2 was instantiated but not sent a message, and wrapped video encoder. | 767 // ext2 was instantiated but not sent a message, and wrapped video encoder. |
768 EXPECT_TRUE(extension2.was_instantiated()); | 768 EXPECT_TRUE(extension2.was_instantiated()); |
769 EXPECT_FALSE(extension2.has_handled_message()); | 769 EXPECT_FALSE(extension2.has_handled_message()); |
770 EXPECT_TRUE(extension2.has_wrapped_video_encoder()); | 770 EXPECT_TRUE(extension2.has_wrapped_video_encoder()); |
771 | 771 |
772 // ext3 was sent a message but not instantiated. | 772 // ext3 was sent a message but not instantiated. |
773 EXPECT_FALSE(extension3.was_instantiated()); | 773 EXPECT_FALSE(extension3.was_instantiated()); |
774 } | 774 } |
775 | 775 |
776 // Verifies that an extension can "steal" the video capture, in which case no | 776 // Verifies that an extension can "steal" the video capture, in which case no |
777 // VideoScheduler is instantiated. | 777 // VideoFramePump is instantiated. |
778 TEST_F(ClientSessionTest, StealVideoCapturer) { | 778 TEST_F(ClientSessionTest, StealVideoCapturer) { |
779 FakeExtension extension("ext1", "cap1"); | 779 FakeExtension extension("ext1", "cap1"); |
780 extensions_.push_back(&extension); | 780 extensions_.push_back(&extension); |
781 | 781 |
782 CreateClientSession(); | 782 CreateClientSession(); |
783 | 783 |
784 SetMatchCapabilitiesExpectation(); | 784 SetMatchCapabilitiesExpectation(); |
785 | 785 |
786 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)) | 786 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)) |
787 .WillOnce(Return(true)); | 787 .WillOnce(Return(true)); |
(...skipping 20 matching lines...) Expand all Loading... |
808 | 808 |
809 DisconnectClientSession(); | 809 DisconnectClientSession(); |
810 StopClientSession(); | 810 StopClientSession(); |
811 | 811 |
812 // ext1 was instantiated and wrapped the video capturer. | 812 // ext1 was instantiated and wrapped the video capturer. |
813 EXPECT_TRUE(extension.was_instantiated()); | 813 EXPECT_TRUE(extension.was_instantiated()); |
814 EXPECT_TRUE(extension.has_wrapped_video_capturer()); | 814 EXPECT_TRUE(extension.has_wrapped_video_capturer()); |
815 } | 815 } |
816 | 816 |
817 } // namespace remoting | 817 } // namespace remoting |
OLD | NEW |