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