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 VideoCaptureManager. | 5 // Unit test for VideoCaptureManager. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/process_util.h" | |
14 #include "content/browser/browser_thread_impl.h" | 13 #include "content/browser/browser_thread_impl.h" |
15 #include "content/browser/renderer_host/media/media_stream_provider.h" | 14 #include "content/browser/renderer_host/media/media_stream_provider.h" |
16 #include "content/browser/renderer_host/media/video_capture_manager.h" | 15 #include "content/browser/renderer_host/media/video_capture_manager.h" |
17 #include "content/common/media/media_stream_options.h" | 16 #include "content/common/media/media_stream_options.h" |
18 #include "media/video/capture/video_capture_device.h" | 17 #include "media/video/capture/video_capture_device.h" |
19 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
21 | 20 |
22 using ::testing::_; | 21 using ::testing::_; |
23 using ::testing::AnyNumber; | 22 using ::testing::AnyNumber; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // VideoCaptureManager destructor otherwise. | 263 // VideoCaptureManager destructor otherwise. |
265 vcm_->Close(video_session_id); | 264 vcm_->Close(video_session_id); |
266 vcm_->Stop(video_session_id, base::Closure()); | 265 vcm_->Stop(video_session_id, base::Closure()); |
267 | 266 |
268 // Wait to check callbacks before removing the listener | 267 // Wait to check callbacks before removing the listener |
269 message_loop_->RunUntilIdle(); | 268 message_loop_->RunUntilIdle(); |
270 vcm_->Unregister(); | 269 vcm_->Unregister(); |
271 } | 270 } |
272 | 271 |
273 } // namespace content | 272 } // namespace content |
OLD | NEW |