| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 file_util::ScopedFILE file_; | 68 file_util::ScopedFILE file_; |
| 69 int expected_size_; | 69 int expected_size_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 class MockVideoCaptureHost : public VideoCaptureHost { | 72 class MockVideoCaptureHost : public VideoCaptureHost { |
| 73 public: | 73 public: |
| 74 MockVideoCaptureHost(MediaStreamManager* manager) | 74 explicit MockVideoCaptureHost(MediaStreamManager* manager) |
| 75 : VideoCaptureHost(), | 75 : VideoCaptureHost(), |
| 76 return_buffers_(false), | 76 return_buffers_(false), |
| 77 dump_video_(false), | 77 dump_video_(false), |
| 78 manager_(manager) {} | 78 manager_(manager) {} |
| 79 | 79 |
| 80 // A list of mock methods. | 80 // A list of mock methods. |
| 81 MOCK_METHOD4(OnNewBufferCreated, | 81 MOCK_METHOD4(OnNewBufferCreated, |
| 82 void(int device_id, base::SharedMemoryHandle handle, | 82 void(int device_id, base::SharedMemoryHandle handle, |
| 83 int length, int buffer_id)); | 83 int length, int buffer_id)); |
| 84 MOCK_METHOD3(OnBufferFilled, | 84 MOCK_METHOD3(OnBufferFilled, |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 #ifdef DUMP_VIDEO | 377 #ifdef DUMP_VIDEO |
| 378 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { | 378 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { |
| 379 CaptureAndDumpVideo(640, 480, 30); | 379 CaptureAndDumpVideo(640, 480, 30); |
| 380 } | 380 } |
| 381 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { | 381 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { |
| 382 CaptureAndDumpVideo(1280, 720, 30); | 382 CaptureAndDumpVideo(1280, 720, 30); |
| 383 } | 383 } |
| 384 #endif | 384 #endif |
| 385 | 385 |
| 386 } // namespace content | 386 } // namespace content |
| OLD | NEW |