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 // Unit test for VideoCaptureController. | 5 // Unit test for VideoCaptureController. |
6 | 6 |
7 #include "content/browser/renderer_host/media/video_capture_controller.h" | 7 #include "content/browser/renderer_host/media/video_capture_controller.h" |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <string.h> | 10 #include <string.h> |
11 | 11 |
12 #include <memory> | 12 #include <memory> |
13 #include <string> | 13 #include <string> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
17 #include "base/bind_helpers.h" | 17 #include "base/bind_helpers.h" |
18 #include "base/location.h" | 18 #include "base/location.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/run_loop.h" | 21 #include "base/run_loop.h" |
22 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
23 #include "base/threading/thread_task_runner_handle.h" | 23 #include "base/threading/thread_task_runner_handle.h" |
24 #include "content/browser/renderer_host/media/media_stream_provider.h" | 24 #include "content/browser/renderer_host/media/media_stream_provider.h" |
25 #include "content/browser/renderer_host/media/video_capture_controller_event_han
dler.h" | 25 #include "content/browser/renderer_host/media/video_capture_controller_event_han
dler.h" |
26 #include "content/browser/renderer_host/media/video_capture_manager.h" | 26 #include "content/browser/renderer_host/media/video_capture_manager.h" |
27 #include "content/common/media/media_stream_options.h" | 27 #include "content/common/media/media_stream_options.h" |
28 #include "content/public/test/test_browser_thread_bundle.h" | 28 #include "content/public/test/test_browser_thread_bundle.h" |
29 #include "media/base/video_capture_types.h" | |
30 #include "media/base/video_frame_metadata.h" | 29 #include "media/base/video_frame_metadata.h" |
31 #include "media/base/video_util.h" | 30 #include "media/base/video_util.h" |
| 31 #include "media/capture/video_capture_types.h" |
32 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 | 34 |
35 using ::testing::_; | 35 using ::testing::_; |
36 using ::testing::InSequence; | 36 using ::testing::InSequence; |
37 using ::testing::Mock; | 37 using ::testing::Mock; |
38 using ::testing::SaveArg; | 38 using ::testing::SaveArg; |
39 | 39 |
40 namespace content { | 40 namespace content { |
41 | 41 |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 Mock::VerifyAndClearExpectations(client_a_.get()); | 561 Mock::VerifyAndClearExpectations(client_a_.get()); |
562 | 562 |
563 // Second client connects after the error state. It also should get told of | 563 // Second client connects after the error state. It also should get told of |
564 // the error. | 564 // the error. |
565 EXPECT_CALL(*client_b_, DoError(route_id)).Times(1); | 565 EXPECT_CALL(*client_b_, DoError(route_id)).Times(1); |
566 controller_->AddClient(route_id, client_b_.get(), 200, session_200); | 566 controller_->AddClient(route_id, client_b_.get(), 200, session_200); |
567 Mock::VerifyAndClearExpectations(client_b_.get()); | 567 Mock::VerifyAndClearExpectations(client_b_.get()); |
568 } | 568 } |
569 | 569 |
570 } // namespace content | 570 } // namespace content |
OLD | NEW |