| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "media/capture/video/chromeos/camera_device_delegate.h" | 5 #include "media/capture/video/chromeos/camera_device_delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 public: | 118 public: |
| 119 CameraDeviceDelegateTest() | 119 CameraDeviceDelegateTest() |
| 120 : mock_camera_device_binding_(&mock_camera_device_), | 120 : mock_camera_device_binding_(&mock_camera_device_), |
| 121 device_delegate_thread_("DeviceDelegateThread"), | 121 device_delegate_thread_("DeviceDelegateThread"), |
| 122 hal_delegate_thread_("HalDelegateThread") {} | 122 hal_delegate_thread_("HalDelegateThread") {} |
| 123 | 123 |
| 124 void SetUp() override { | 124 void SetUp() override { |
| 125 hal_delegate_thread_.Start(); | 125 hal_delegate_thread_.Start(); |
| 126 camera_hal_delegate_ = | 126 camera_hal_delegate_ = |
| 127 new CameraHalDelegate(hal_delegate_thread_.task_runner()); | 127 new CameraHalDelegate(hal_delegate_thread_.task_runner()); |
| 128 camera_hal_delegate_->StartForTesting( | 128 camera_hal_delegate_->SetCameraModule( |
| 129 mock_camera_module_.GetInterfacePtrInfo()); | 129 mock_camera_module_.GetInterfacePtrInfo()); |
| 130 | 130 |
| 131 ResetCaptureClient(); | 131 ResetCaptureClient(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void TearDown() override { | 134 void TearDown() override { |
| 135 camera_hal_delegate_->Reset(); | 135 camera_hal_delegate_->Reset(); |
| 136 hal_delegate_thread_.Stop(); | 136 hal_delegate_thread_.Stop(); |
| 137 } | 137 } |
| 138 | 138 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 camera_device_delegate_)); | 493 camera_device_delegate_)); |
| 494 | 494 |
| 495 // Wait until the MockVideoCaptureClient is deleted. | 495 // Wait until the MockVideoCaptureClient is deleted. |
| 496 DoLoop(); | 496 DoLoop(); |
| 497 EXPECT_EQ(CameraDeviceContext::State::kStopped, GetState()); | 497 EXPECT_EQ(CameraDeviceContext::State::kStopped, GetState()); |
| 498 | 498 |
| 499 ResetDevice(); | 499 ResetDevice(); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace media | 502 } // namespace media |
| OLD | NEW |