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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 base::TimeDelta(), | 145 base::TimeDelta(), |
146 base::Closure()); | 146 base::Closure()); |
147 } | 147 } |
148 | 148 |
149 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( | 149 scoped_refptr<media::VideoFrame> WrapMailboxBuffer( |
150 const gpu::MailboxHolder& holder, | 150 const gpu::MailboxHolder& holder, |
151 const media::VideoFrame::ReleaseMailboxCB& release_cb, | 151 const media::VideoFrame::ReleaseMailboxCB& release_cb, |
152 gfx::Size dimensions) { | 152 gfx::Size dimensions) { |
153 return media::VideoFrame::WrapNativeTexture( | 153 return media::VideoFrame::WrapNativeTexture( |
154 holder, release_cb, dimensions, gfx::Rect(dimensions), dimensions, | 154 holder, release_cb, dimensions, gfx::Rect(dimensions), dimensions, |
155 base::TimeDelta(), false); | 155 base::TimeDelta(), false /* allow_overlay */, true /* has_alpha */); |
156 } | 156 } |
157 | 157 |
158 TestBrowserThreadBundle bundle_; | 158 TestBrowserThreadBundle bundle_; |
159 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_; | 159 scoped_ptr<MockVideoCaptureControllerEventHandler> client_a_; |
160 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_; | 160 scoped_ptr<MockVideoCaptureControllerEventHandler> client_b_; |
161 scoped_ptr<VideoCaptureController> controller_; | 161 scoped_ptr<VideoCaptureController> controller_; |
162 scoped_ptr<media::VideoCaptureDevice::Client> device_; | 162 scoped_ptr<media::VideoCaptureDevice::Client> device_; |
163 | 163 |
164 private: | 164 private: |
165 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest); | 165 DISALLOW_COPY_AND_ASSIGN(VideoCaptureControllerTest); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); | 701 EXPECT_EQ(coded_size.width(), size_and_rotation.output_resolution.width()); |
702 EXPECT_EQ(coded_size.height(), | 702 EXPECT_EQ(coded_size.height(), |
703 size_and_rotation.output_resolution.height()); | 703 size_and_rotation.output_resolution.height()); |
704 | 704 |
705 EXPECT_EQ(kSessionId, controller_->RemoveClient(route_id, client_a_.get())); | 705 EXPECT_EQ(kSessionId, controller_->RemoveClient(route_id, client_a_.get())); |
706 Mock::VerifyAndClearExpectations(client_a_.get()); | 706 Mock::VerifyAndClearExpectations(client_a_.get()); |
707 } | 707 } |
708 } | 708 } |
709 | 709 |
710 } // namespace content | 710 } // namespace content |
OLD | NEW |