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(); | |
275 } | 273 } |
276 | 274 |
277 void OpenSession() { | 275 void OpenSession() { |
278 const int render_process_id = 1; | 276 const int render_process_id = 1; |
279 const int render_view_id = 1; | 277 const int render_view_id = 1; |
280 const int page_request_id = 1; | 278 const int page_request_id = 1; |
281 const GURL security_origin; | 279 const GURL security_origin("http://test.com"); |
282 | 280 |
283 ASSERT_TRUE(opened_device_label_.empty()); | 281 ASSERT_TRUE(opened_device_label_.empty()); |
284 | 282 |
285 // Enumerate video devices. | 283 // Enumerate video devices. |
286 StreamDeviceInfoArray devices; | 284 StreamDeviceInfoArray devices; |
287 { | 285 { |
288 base::RunLoop run_loop; | 286 base::RunLoop run_loop; |
289 std::string label = media_stream_manager_->EnumerateDevices( | 287 std::string label = media_stream_manager_->EnumerateDevices( |
290 &stream_requester_, | 288 &stream_requester_, |
291 render_process_id, | 289 render_process_id, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 #ifdef DUMP_VIDEO | 481 #ifdef DUMP_VIDEO |
484 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { | 482 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { |
485 CaptureAndDumpVideo(640, 480, 30); | 483 CaptureAndDumpVideo(640, 480, 30); |
486 } | 484 } |
487 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { | 485 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { |
488 CaptureAndDumpVideo(1280, 720, 30); | 486 CaptureAndDumpVideo(1280, 720, 30); |
489 } | 487 } |
490 #endif | 488 #endif |
491 | 489 |
492 } // namespace content | 490 } // namespace content |
OLD | NEW |