| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/strings/string_util.h" | 5 #include "base/strings/string_util.h" |
| 6 #include "remoting/codec/video_encoder.h" | 6 #include "remoting/codec/video_encoder.h" |
| 7 #include "remoting/host/fake_host_extension.h" | 7 #include "remoting/host/fake_host_extension.h" |
| 8 #include "remoting/host/host_extension_session_manager.h" | 8 #include "remoting/host/host_extension_session_manager.h" |
| 9 #include "remoting/host/host_mock_objects.h" | 9 #include "remoting/host/host_mock_objects.h" |
| 10 #include "remoting/proto/control.pb.h" | 10 #include "remoting/proto/control.pb.h" |
| 11 #include "remoting/protocol/protocol_mock_objects.h" | 11 #include "remoting/protocol/protocol_mock_objects.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" | 13 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
| 14 | 14 |
| 15 namespace remoting { | 15 namespace remoting { |
| 16 | 16 |
| 17 class HostExtensionSessionManagerTest : public testing::Test { | 17 class HostExtensionSessionManagerTest : public testing::Test { |
| 18 public: | 18 public: |
| 19 HostExtensionSessionManagerTest() | 19 HostExtensionSessionManagerTest() |
| 20 : extension1_("ext1", "cap1"), | 20 : extension1_("ext1", "cap1"), |
| 21 extension2_("ext2", std::string()), | 21 extension2_("ext2", std::string()), |
| 22 extension3_("ext3", "cap3") { | 22 extension3_("ext3", "cap3") { |
| 23 extensions_.push_back(&extension1_); | 23 extensions_.push_back(&extension1_); |
| 24 extensions_.push_back(&extension2_); | 24 extensions_.push_back(&extension2_); |
| 25 extensions_.push_back(&extension3_); | 25 extensions_.push_back(&extension3_); |
| 26 } | 26 } |
| 27 virtual ~HostExtensionSessionManagerTest() {} | 27 ~HostExtensionSessionManagerTest() override {} |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 // Fake HostExtensions for testing. | 30 // Fake HostExtensions for testing. |
| 31 FakeExtension extension1_; | 31 FakeExtension extension1_; |
| 32 FakeExtension extension2_; | 32 FakeExtension extension2_; |
| 33 FakeExtension extension3_; | 33 FakeExtension extension3_; |
| 34 HostExtensionSessionManager::HostExtensions extensions_; | 34 HostExtensionSessionManager::HostExtensions extensions_; |
| 35 | 35 |
| 36 // Mocks of interfaces provided by ClientSession. | 36 // Mocks of interfaces provided by ClientSession. |
| 37 MockClientSessionControl client_session_control_; | 37 MockClientSessionControl client_session_control_; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 EXPECT_CALL(client_session_control_, ResetVideoPipeline()); | 179 EXPECT_CALL(client_session_control_, ResetVideoPipeline()); |
| 180 | 180 |
| 181 // Set up only the first extension to request to modify the video pipeline. | 181 // Set up only the first extension to request to modify the video pipeline. |
| 182 extension1_.set_steal_video_capturer(true); | 182 extension1_.set_steal_video_capturer(true); |
| 183 | 183 |
| 184 extension_manager.OnNegotiatedCapabilities(&client_stub_, "cap1"); | 184 extension_manager.OnNegotiatedCapabilities(&client_stub_, "cap1"); |
| 185 } | 185 } |
| 186 | 186 |
| 187 | 187 |
| 188 } // namespace remoting | 188 } // namespace remoting |
| OLD | NEW |