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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 EXPECT_EQ(0u, host_->entries_.size()); | 263 EXPECT_EQ(0u, host_->entries_.size()); |
264 | 264 |
265 CloseSession(); | 265 CloseSession(); |
266 | 266 |
267 // Simulate closing the IPC channel. | 267 // Simulate closing the IPC channel. |
268 host_->OnChannelClosing(); | 268 host_->OnChannelClosing(); |
269 | 269 |
270 // Release the reference to the mock object. The object will be destructed | 270 // Release the reference to the mock object. The object will be destructed |
271 // on the current message loop. | 271 // on the current message loop. |
272 host_ = NULL; | 272 host_ = NULL; |
| 273 |
| 274 media_stream_manager_->WillDestroyCurrentMessageLoop(); |
273 } | 275 } |
274 | 276 |
275 void OpenSession() { | 277 void OpenSession() { |
276 const int render_process_id = 1; | 278 const int render_process_id = 1; |
277 const int render_view_id = 1; | 279 const int render_view_id = 1; |
278 const int page_request_id = 1; | 280 const int page_request_id = 1; |
279 const GURL security_origin("http://test.com"); | 281 const GURL security_origin; |
280 | 282 |
281 ASSERT_TRUE(opened_device_label_.empty()); | 283 ASSERT_TRUE(opened_device_label_.empty()); |
282 | 284 |
283 // Enumerate video devices. | 285 // Enumerate video devices. |
284 StreamDeviceInfoArray devices; | 286 StreamDeviceInfoArray devices; |
285 { | 287 { |
286 base::RunLoop run_loop; | 288 base::RunLoop run_loop; |
287 std::string label = media_stream_manager_->EnumerateDevices( | 289 std::string label = media_stream_manager_->EnumerateDevices( |
288 &stream_requester_, | 290 &stream_requester_, |
289 render_process_id, | 291 render_process_id, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 #ifdef DUMP_VIDEO | 483 #ifdef DUMP_VIDEO |
482 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { | 484 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { |
483 CaptureAndDumpVideo(640, 480, 30); | 485 CaptureAndDumpVideo(640, 480, 30); |
484 } | 486 } |
485 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { | 487 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { |
486 CaptureAndDumpVideo(1280, 720, 30); | 488 CaptureAndDumpVideo(1280, 720, 30); |
487 } | 489 } |
488 #endif | 490 #endif |
489 | 491 |
490 } // namespace content | 492 } // namespace content |
OLD | NEW |