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 #include <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
241 | 241 |
242 // Simulate closing the IPC channel. | 242 // Simulate closing the IPC channel. |
243 host_->OnChannelClosing(); | 243 host_->OnChannelClosing(); |
244 | 244 |
245 // Release the reference to the mock object. The object will be destructed | 245 // Release the reference to the mock object. The object will be destructed |
246 // on message_loop_. | 246 // on message_loop_. |
247 host_ = NULL; | 247 host_ = NULL; |
248 | 248 |
249 // We need to continue running message_loop_ to complete all destructions. | 249 // We need to continue running message_loop_ to complete all destructions. |
250 message_loop_->RunAllPending(); | 250 message_loop_->RunAllPending(); |
251 | |
252 // Delete the IO message loop to delete the device thread and managers. | |
tommi (sloooow) - chröme
2012/07/17 15:36:58
which managers?
no longer working on chromium
2012/07/17 17:18:25
Done.
| |
253 message_loop_.reset(); | |
251 } | 254 } |
252 | 255 |
253 void StartCapture() { | 256 void StartCapture() { |
254 InSequence s; | 257 InSequence s; |
255 // 1. First - get info about the new resolution | 258 // 1. First - get info about the new resolution |
256 EXPECT_CALL(*host_, OnDeviceInfo(kDeviceId)); | 259 EXPECT_CALL(*host_, OnDeviceInfo(kDeviceId)); |
257 | 260 |
258 // 2. Change state to started | 261 // 2. Change state to started |
259 EXPECT_CALL(*host_, OnStateChanged(kDeviceId, | 262 EXPECT_CALL(*host_, OnStateChanged(kDeviceId, |
260 video_capture::kStarted)); | 263 video_capture::kStarted)); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 } | 384 } |
382 | 385 |
383 #ifdef DUMP_VIDEO | 386 #ifdef DUMP_VIDEO |
384 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { | 387 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { |
385 CaptureAndDumpVideo(640, 480, 30); | 388 CaptureAndDumpVideo(640, 480, 30); |
386 } | 389 } |
387 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { | 390 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { |
388 CaptureAndDumpVideo(1280, 720, 30); | 391 CaptureAndDumpVideo(1280, 720, 30); |
389 } | 392 } |
390 #endif | 393 #endif |
OLD | NEW |